Mercurial > hg > tony
diff src/MainWindow.cpp @ 252:f99fae5fe89c
Fix accidental nesting of compound commands which broke "Abandon Selection" logic; move note-snap after editing into the compound command for the edit function instead of issuing a separate command
author | Chris Cannam |
---|---|
date | Wed, 02 Apr 2014 09:12:18 +0100 |
parents | 3b5ea600829c |
children | b6b2f69c516d |
line wrap: on
line diff
--- a/src/MainWindow.cpp Wed Apr 02 09:03:42 2014 +0100 +++ b/src/MainWindow.cpp Wed Apr 02 09:12:18 2014 +0100 @@ -1946,15 +1946,12 @@ if (!selections.empty()) { Selection sel = *selections.begin(); m_analyser->abandonReAnalysis(sel); + auxSnapNotes(sel); } MainWindowBase::clearSelection(); CommandHistory::getInstance()->endCompoundOperation(); - - if (!selections.empty()) { - auxSnapNotes(*selections.begin()); - } } void @@ -2034,11 +2031,10 @@ for (MultiSelection::SelectionList::iterator k = selections.begin(); k != selections.end(); ++k) { m_analyser->deletePitches(*k); + auxSnapNotes(*k); } CommandHistory::getInstance()->endCompoundOperation(); - - snapNotesToPitches(); } void @@ -2053,11 +2049,10 @@ k != selections.end(); ++k) { m_analyser->shiftOctave(*k, up); + auxSnapNotes(*k); } CommandHistory::getInstance()->endCompoundOperation(); - - snapNotesToPitches(); } void @@ -2086,11 +2081,10 @@ for (MultiSelection::SelectionList::iterator k = selections.begin(); k != selections.end(); ++k) { m_analyser->switchPitchCandidate(*k, true); + auxSnapNotes(*k); } CommandHistory::getInstance()->endCompoundOperation(); - - snapNotesToPitches(); } } else { octaveShift(true); @@ -2111,11 +2105,10 @@ for (MultiSelection::SelectionList::iterator k = selections.begin(); k != selections.end(); ++k) { m_analyser->switchPitchCandidate(*k, false); + auxSnapNotes(*k); } CommandHistory::getInstance()->endCompoundOperation(); - - snapNotesToPitches(); } } else { octaveShift(false);