mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-16 08:34:10 +02:00
Rename the two commands for the Saved cursor position
After discussion on Audacity-quality mailing list, the commands now refer to the stored cursor position, rather than the saved cursor position. (This position is not saved to disc).
This commit is contained in:
parent
7156d5b5c1
commit
87c0eb1563
@ -558,7 +558,7 @@ void AudacityProject::CreateMenusAndCommands()
|
|||||||
|
|
||||||
c->AddItem(wxT("SelStartCursor"), _("Track &Start to Cursor"), FN(OnSelectStartCursor), wxT("Shift+J"));
|
c->AddItem(wxT("SelStartCursor"), _("Track &Start to Cursor"), FN(OnSelectStartCursor), wxT("Shift+J"));
|
||||||
c->AddItem(wxT("SelCursorEnd"), _("Cursor to Track &End"), FN(OnSelectCursorEnd), wxT("Shift+K"));
|
c->AddItem(wxT("SelCursorEnd"), _("Cursor to Track &End"), FN(OnSelectCursorEnd), wxT("Shift+K"));
|
||||||
c->AddItem(wxT("SelCursorSavedCursor"), _("Cursor to Saved &Cursor Position"), FN(OnSelectCursorSavedCursor),
|
c->AddItem(wxT("SelCursorStoredCursor"), _("Cursor to Stored &Cursor Position"), FN(OnSelectCursorStoredCursor),
|
||||||
wxT(""), TracksExistFlag, TracksExistFlag);
|
wxT(""), TracksExistFlag, TracksExistFlag);
|
||||||
|
|
||||||
|
|
||||||
@ -603,7 +603,7 @@ void AudacityProject::CreateMenusAndCommands()
|
|||||||
c->AddItem(wxT("SelRestore"), _("Regio&n Restore"), FN(OnSelectionRestore),
|
c->AddItem(wxT("SelRestore"), _("Regio&n Restore"), FN(OnSelectionRestore),
|
||||||
TracksExistFlag,
|
TracksExistFlag,
|
||||||
TracksExistFlag);
|
TracksExistFlag);
|
||||||
c->AddItem(wxT("SaveCursorPosition"), _("Save Cursor Pos&ition"), FN(OnCursorPositionSave),
|
c->AddItem(wxT("StoreCursorPosition"), _("Store Cursor Pos&ition"), FN(OnCursorPositionStore),
|
||||||
WaveTracksExistFlag,
|
WaveTracksExistFlag,
|
||||||
WaveTracksExistFlag);
|
WaveTracksExistFlag);
|
||||||
|
|
||||||
@ -5185,12 +5185,12 @@ void AudacityProject::OnSelectStartCursor()
|
|||||||
mTrackPanel->Refresh(false);
|
mTrackPanel->Refresh(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudacityProject::OnSelectCursorSavedCursor()
|
void AudacityProject::OnSelectCursorStoredCursor()
|
||||||
{
|
{
|
||||||
if (mCursorPositionHasBeenSaved) {
|
if (mCursorPositionHasBeenStored) {
|
||||||
double cursorPositionCurrent = IsAudioActive() ? gAudioIO->GetStreamTime() : mViewInfo.selectedRegion.t0();
|
double cursorPositionCurrent = IsAudioActive() ? gAudioIO->GetStreamTime() : mViewInfo.selectedRegion.t0();
|
||||||
mViewInfo.selectedRegion.setTimes(std::min(cursorPositionCurrent, mCursorPositionSaved),
|
mViewInfo.selectedRegion.setTimes(std::min(cursorPositionCurrent, mCursorPositionStored),
|
||||||
std::max(cursorPositionCurrent, mCursorPositionSaved));
|
std::max(cursorPositionCurrent, mCursorPositionStored));
|
||||||
|
|
||||||
ModifyState(false);
|
ModifyState(false);
|
||||||
mTrackPanel->Refresh(false);
|
mTrackPanel->Refresh(false);
|
||||||
@ -5913,10 +5913,10 @@ void AudacityProject::OnSelectionSave()
|
|||||||
mRegionSave = mViewInfo.selectedRegion;
|
mRegionSave = mViewInfo.selectedRegion;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudacityProject::OnCursorPositionSave()
|
void AudacityProject::OnCursorPositionStore()
|
||||||
{
|
{
|
||||||
mCursorPositionSaved = IsAudioActive() ? gAudioIO->GetStreamTime() : mViewInfo.selectedRegion.t0();
|
mCursorPositionStored = IsAudioActive() ? gAudioIO->GetStreamTime() : mViewInfo.selectedRegion.t0();
|
||||||
mCursorPositionHasBeenSaved = true;
|
mCursorPositionHasBeenStored = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudacityProject::OnSelectionRestore()
|
void AudacityProject::OnSelectionRestore()
|
||||||
|
@ -270,7 +270,7 @@ void OnNextLowerPeakFrequency();
|
|||||||
#endif
|
#endif
|
||||||
void OnSelectCursorEnd();
|
void OnSelectCursorEnd();
|
||||||
void OnSelectStartCursor();
|
void OnSelectStartCursor();
|
||||||
void OnSelectCursorSavedCursor();
|
void OnSelectCursorStoredCursor();
|
||||||
void OnSelectSyncLockSel();
|
void OnSelectSyncLockSel();
|
||||||
void OnSelectAllTracks();
|
void OnSelectAllTracks();
|
||||||
|
|
||||||
@ -347,12 +347,12 @@ void HandleMixAndRender(bool toNewTrack);
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
SelectedRegion mRegionSave{};
|
SelectedRegion mRegionSave{};
|
||||||
bool mCursorPositionHasBeenSaved{false};
|
bool mCursorPositionHasBeenStored{false};
|
||||||
double mCursorPositionSaved;
|
double mCursorPositionStored;
|
||||||
public:
|
public:
|
||||||
void OnSelectionSave();
|
void OnSelectionSave();
|
||||||
void OnSelectionRestore();
|
void OnSelectionRestore();
|
||||||
void OnCursorPositionSave();
|
void OnCursorPositionStore();
|
||||||
|
|
||||||
void OnCursorTrackStart();
|
void OnCursorTrackStart();
|
||||||
void OnCursorTrackEnd();
|
void OnCursorTrackEnd();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user