1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-21 22:12:58 +02:00

Use track selection for SetTrack, SetClip and SetEnvelope

These commands now have shorter dialogs.
Also fixed SetEnvelope optionals, which were not being honoured.
This commit is contained in:
James Crook
2018-03-19 11:59:33 +00:00
parent e661c7da49
commit 0a7d0068ec
5 changed files with 61 additions and 112 deletions

View File

@@ -18,10 +18,11 @@
#include "Command.h"
#include "CommandType.h"
#include "SetTrackInfoCommand.h"
#define SET_CLIP_PLUGIN_SYMBOL XO("Set Clip")
class SetClipCommand : public AudacityCommand
class SetClipCommand : public SetTrackBase
{
public:
SetClipCommand();
@@ -33,19 +34,14 @@ public:
// AudacityCommand overrides
wxString ManualPage() override {return wxT("Extra_Menu:_Tools#set_clip");};
bool Apply(const CommandContext & context) override;
bool ApplyInner( const CommandContext & context, Track * t ) override;
public:
int mTrackIndex;
int mChannelIndex;
double mContainsTime;
int mColour;
double mT0;
// For tracking optional parameters.
bool bHasTrackIndex;
bool bHasChannelIndex;
bool bHasContainsTime;
bool bHasColour;
bool bHasT0;