mirror of
https://github.com/cookiengineer/audacity
synced 2026-02-07 12:12:23 +01:00
static SelectionState::Get()...
... not member functions of AudacityProject
This commit is contained in:
@@ -11,6 +11,21 @@
|
||||
|
||||
#include "ViewInfo.h"
|
||||
#include "Track.h"
|
||||
#include "Project.h"
|
||||
|
||||
static const AudacityProject::AttachedObjects::RegisteredFactory key{
|
||||
[](AudacityProject &){ return std::make_shared< SelectionState >(); }
|
||||
};
|
||||
|
||||
SelectionState &SelectionState::Get( AudacityProject &project )
|
||||
{
|
||||
return project.AttachedObjects::Get< SelectionState >( key );
|
||||
}
|
||||
|
||||
const SelectionState &SelectionState::Get( const AudacityProject &project )
|
||||
{
|
||||
return Get( const_cast< AudacityProject & >( project ) );
|
||||
}
|
||||
|
||||
// Set selection length to the length of a track -- but if sync-lock is turned
|
||||
// on, use the largest possible selection in the sync-lock group.
|
||||
|
||||
Reference in New Issue
Block a user