1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-18 08:48:17 +01:00

Disallow AutoSelect on dangerous commands.

Commands flagged with NoAutoSelect will not auto select, even if the user has asked for it.  This is used for Cut and 3 different kinds of delete.  We later might extend it to fades and repair.
This commit is contained in:
James Crook
2017-06-09 22:36:05 +01:00
parent 64a28861a0
commit 7341bff9e0
4 changed files with 15 additions and 5 deletions

View File

@@ -2327,6 +2327,10 @@ bool AudacityProject::TryToMakeActionAllowed
if( mWhatIfNoSelection != 1 )
return false;
// Some effects disallow autoselection.
if( flagsRqd & NoAutoSelect )
return false;
// Why is action still not allowed?
// 0's wherever a required flag is missing (or is don't care)
MissingFlags = (flags & ~flagsRqd) & mask;