MCPcopy Create free account
hub / github.com/audacity/audacity / SelectAllIfNoneAndAllowed

Function SelectAllIfNoneAndAllowed

src/SelectUtilities.cpp:100–114  ·  view source on GitHub ↗

Select the full time range, if no time range is selected and selecting is allowed. Returns "false" selecting not allowed.

Source from the content-addressed store, hash-verified

98// Select the full time range, if no time range is selected and
99// selecting is allowed. Returns "false" selecting not allowed.
100bool SelectAllIfNoneAndAllowed( AudacityProject &project )
101{
102 auto allowed = gPrefs->ReadBool(wxT("/GUI/SelectAllOnNone"), false);
103 auto &viewInfo = ViewInfo::Get( project );
104 auto flags = CommandManager::Get( project ).GetUpdateFlags();
105
106 if((flags & EditableTracksSelectedFlag()).none() ||
107 viewInfo.selectedRegion.isPoint()) {
108 if (!allowed) {
109 return false;
110 }
111 DoSelectAllAudio( project );
112 }
113 return true;
114}
115
116void DoListSelection(
117 AudacityProject &project, Track &t, bool shift, bool ctrl, bool modifyState)

Callers 1

ApplyEffectCommandMethod · 0.85

Calls 4

GetFunction · 0.85
DoSelectAllAudioFunction · 0.85
ReadBoolMethod · 0.80
GetUpdateFlagsMethod · 0.80

Tested by

no test coverage detected