1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-17 14:11:13 +01:00

Split class ProjectSelectionManager from ProjectManager...

... handling the callbacks from the selection toolbars.

Next ProjectFileManager will be split out of ProjectManager, and
ProjectSelectionManager will be used by it during file opening, so separating
files for it avoids a cycle.
This commit is contained in:
Paul Licameli
2019-06-06 11:21:15 -04:00
parent 0c6cda50c3
commit 186f2f6ac7
5 changed files with 95 additions and 49 deletions

View File

@@ -253,7 +253,7 @@ void QuickFixDialog::OnFix(wxCommandEvent &event)
// preference dialogs.
if( Str == "/SnapTo" )
{
ProjectManager::Get( *pProject ).AS_SetSnapTo( 0 );
ProjectSelectionManager::Get( *pProject ).AS_SetSnapTo( 0 );
}
else
{

View File

@@ -901,19 +901,19 @@ void OnZeroCrossing(const CommandContext &context)
void OnSnapToOff(const CommandContext &context)
{
auto &project = context.project;
ProjectManager::Get( project ).AS_SetSnapTo(SNAP_OFF);
ProjectSelectionManager::Get( project ).AS_SetSnapTo(SNAP_OFF);
}
void OnSnapToNearest(const CommandContext &context)
{
auto &project = context.project;
ProjectManager::Get( project ).AS_SetSnapTo(SNAP_NEAREST);
ProjectSelectionManager::Get( project ).AS_SetSnapTo(SNAP_NEAREST);
}
void OnSnapToPrior(const CommandContext &context)
{
auto &project = context.project;
ProjectManager::Get( project ).AS_SetSnapTo(SNAP_PRIOR);
ProjectSelectionManager::Get( project ).AS_SetSnapTo(SNAP_PRIOR);
}
void OnSelToStart(const CommandContext &context)