mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-23 09:20:16 +01:00
Bug 2366 - Macros: Run does "Select All" ignoring setting in Tracks Behaviors Preferences
Reverted the wrong commit...needed to add an include anyway.
This commit is contained in:
@@ -21,8 +21,10 @@
|
||||
#include "../ProjectFileManager.h"
|
||||
#include "../ViewInfo.h"
|
||||
#include "../export/Export.h"
|
||||
#include "../SelectUtilities.h"
|
||||
#include "../Shuttle.h"
|
||||
#include "../ShuttleGui.h"
|
||||
#include "../Track.h"
|
||||
#include "../wxFileNameWrapper.h"
|
||||
#include "CommandContext.h"
|
||||
|
||||
@@ -47,9 +49,18 @@ void ImportCommand::PopulateOrExchange(ShuttleGui & S)
|
||||
S.EndMultiColumn();
|
||||
}
|
||||
|
||||
bool ImportCommand::Apply(const CommandContext & context){
|
||||
return ProjectFileManager::Get( context.project )
|
||||
bool ImportCommand::Apply(const CommandContext & context)
|
||||
{
|
||||
bool wasEmpty = TrackList::Get( context.project ).Any().empty();
|
||||
bool success = ProjectFileManager::Get( context.project )
|
||||
.Import(mFileName, false);
|
||||
|
||||
if (success && wasEmpty)
|
||||
{
|
||||
SelectUtilities::SelectAllIfNone( context.project );
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user