mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-09 14:16:28 +01:00
Bug 2366 - Macros: Run does "Select All" ignoring setting in Tracks Behaviors Preferences
This commit is contained in:
@@ -90,6 +90,24 @@ void SelectAllIfNone( AudacityProject &project )
|
||||
DoSelectAllAudio( project );
|
||||
}
|
||||
|
||||
// Select the full time range, if no time range is selected and
|
||||
// selecting is allowed. Returns "false" selecting not allowed.
|
||||
bool SelectAllIfNoneAndAllowed( AudacityProject &project )
|
||||
{
|
||||
auto allowed = gPrefs->ReadBool(wxT("/GUI/SelectAllOnNone"), false);
|
||||
auto &viewInfo = ViewInfo::Get( project );
|
||||
auto flags = MenuManager::Get( project ).GetUpdateFlags();
|
||||
|
||||
if((flags & TracksSelectedFlag()).none() ||
|
||||
viewInfo.selectedRegion.isPoint()) {
|
||||
if (!allowed) {
|
||||
return false;
|
||||
}
|
||||
DoSelectAllAudio( project );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void DoListSelection
|
||||
(AudacityProject &project, Track *t, bool shift, bool ctrl, bool modifyState)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user