mirror of
https://github.com/cookiengineer/audacity
synced 2026-02-17 16:28:13 +01:00
Smarter SelectAllIfNone
Now if there is a time selection and no tracks selected, then just select all the tracks, preserving the time selection. This helps in the case a user has made a time selection, e.g. with selection toolbar, and then clicked on track panel, losing the selection of tracks but preserving the time selection. I also shortened some repeated cut-and-pasted code.
This commit is contained in:
@@ -2311,7 +2311,9 @@ bool AudacityProject::TryToMakeActionAllowed
|
||||
if( (MissingFlags & ~( TimeSelectedFlag | WaveTracksSelectedFlag)) )
|
||||
return false;
|
||||
|
||||
OnSelectAll();
|
||||
// This was 'OnSelectAll'. Changing it to OnSelectSomething means if
|
||||
// selecting all tracks is enough, we just do that.
|
||||
OnSelectSomething();
|
||||
flags = GetUpdateFlags();
|
||||
bAllowed = ((flags & mask) == (flagsRqd & mask));
|
||||
return bAllowed;
|
||||
@@ -4607,19 +4609,6 @@ void AudacityProject::Clear()
|
||||
RedrawProject();
|
||||
}
|
||||
|
||||
void AudacityProject::SelectNone()
|
||||
{
|
||||
TrackListIterator iter(GetTracks());
|
||||
Track *t = iter.First();
|
||||
while (t) {
|
||||
t->SetSelected(false);
|
||||
t = iter.Next();
|
||||
}
|
||||
mTrackPanel->Refresh(false);
|
||||
if (mMixerBoard)
|
||||
mMixerBoard->Refresh(false);
|
||||
}
|
||||
|
||||
// Utility function called by other zoom methods
|
||||
void AudacityProject::Zoom(double level)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user