Mercurial > hg > tony
diff src/Analyser.h @ 194:34797795a76c
Clearing the selection by hitting Esc now restores the selected region of the pitch track to its contents from before the selection was made (and any alternate candidate chosen). Fixes feature #885
author | Chris Cannam |
---|---|
date | Wed, 05 Mar 2014 10:38:23 +0000 |
parents | 431a95c9d14d |
children | bb391844e2aa |
line wrap: on
line diff
--- a/src/Analyser.h Wed Mar 05 09:45:17 2014 +0000 +++ b/src/Analyser.h Wed Mar 05 10:38:23 2014 +0000 @@ -24,6 +24,7 @@ #include "framework/Document.h" #include "base/Selection.h" +#include "base/Clipboard.h" class WaveFileModel; class Pane; @@ -108,6 +109,8 @@ * independent of whether any pitch candidates actually exist -- * it's possible they might be shown but not have been created yet * because creation (through reAnalyseSelection) is asynchronous. + * + *!!! this interface is not right */ bool arePitchCandidatesShown() const; @@ -116,6 +119,8 @@ * arePitchCandidatesShown, this is independent of whether the * candidate layers actually exist. Call reAnalyseSelection to * schedule creation of those layers. + * + *!!! this interface is not right */ void showPitchCandidates(bool shown); @@ -139,9 +144,12 @@ void shiftOctave(Selection sel, bool up); /** - * Remove any re-analysis layers. + * Remove any re-analysis layers (equivalent to + * showPitchCandidates(false)) and also reset the pitch track in + * the given selection to its state prior to the last re-analysis, + * abandoning any changes made since then. */ - void clearReAnalysis(); + void clearReAnalysis(Selection sel); /** * Import the pitch track from the given layer into our @@ -168,6 +176,7 @@ mutable std::map<Component, Layer *> m_layers; + Clipboard m_preAnalysis; Selection m_reAnalysingSelection; std::vector<Layer *> m_reAnalysisCandidates; int m_currentCandidate;