diff --git a/src/commands/DragCommand.cpp b/src/commands/DragCommand.cpp index c1b4cc541..0341f5aa6 100644 --- a/src/commands/DragCommand.cpp +++ b/src/commands/DragCommand.cpp @@ -81,6 +81,16 @@ void DragCommand::PopulateOrExchange(ShuttleGui & S) bool DragCommand::Apply(const CommandContext & context) { + // Defaults if no value... + if( !bHasFromX ) + mFromX = 200.0; + if( !bHasFromY ) + mFromY = 10; + if( !bHasToX ) + mToX = 400; + if( !bHasToY ) + mToY = 10; + wxWindow * pWin = context.GetProject(); wxWindow * pWin1 = nullptr; wxMouseEvent Evt( wxEVT_MOTION ); diff --git a/src/commands/SelectCommand.cpp b/src/commands/SelectCommand.cpp index b7fcdc3b6..61e334d01 100644 --- a/src/commands/SelectCommand.cpp +++ b/src/commands/SelectCommand.cpp @@ -88,6 +88,14 @@ bool SelectTimeCommand::Apply(const CommandContext & context){ if( !bHasT0 && !bHasT1 ) return true; + // Defaults if no value... + if( !bHasT0 ) + mT0 = 0.0; + if( !bHasT1 ) + mT1 = 0.0; + if( !bHasRelativeSpec ) + mRelativeTo = 0; + AudacityProject * p = context.GetProject(); double end = p->GetTracks()->GetEndTime(); double t0; @@ -148,6 +156,12 @@ bool SelectFrequenciesCommand::Apply(const CommandContext & context){ if( !bHasBottom && !bHasTop ) return true; + // Defaults if no value... + if( !bHasTop ) + mTop = 0.0; + if( !bHasBottom ) + mBottom = 0.0; + context.GetProject()->SSBL_ModifySpectralSelection( mBottom, mTop, false);// false for not done. return true; @@ -195,6 +209,13 @@ bool SelectTracksCommand::Apply(const CommandContext &context) { int index = 0; TrackList *tracks = context.GetProject()->GetTracks(); + + // Defaults if no value... + if( !bHasNumTracks ) + mNumTracks = 1.0; + if( !bHasFirstTrack ) + mFirstTrack = 0.0; + // Stereo second tracks count as 0.5 of a track. double last = mFirstTrack+mNumTracks; double first = mFirstTrack; diff --git a/src/commands/SetClipCommand.cpp b/src/commands/SetClipCommand.cpp index e9bfe6cd4..b90ee7f39 100644 --- a/src/commands/SetClipCommand.cpp +++ b/src/commands/SetClipCommand.cpp @@ -77,6 +77,8 @@ bool SetClipCommand::ApplyInner( const CommandContext & context, Track * t ) if( t->GetKind() != Track::Wave) return true; + // if no 'At' is specified, then any clip in any selected track will be set. + WaveTrack *waveTrack = static_cast(t); wxASSERT( waveTrack ); WaveClipPointers ptrs( waveTrack->SortedClipArray()); diff --git a/src/commands/SetEnvelopeCommand.cpp b/src/commands/SetEnvelopeCommand.cpp index 692df7b62..cab2981a0 100644 --- a/src/commands/SetEnvelopeCommand.cpp +++ b/src/commands/SetEnvelopeCommand.cpp @@ -56,6 +56,10 @@ bool SetEnvelopeCommand::ApplyInner( const CommandContext & context, Track * t ) if( (t->GetKind() != Track::Wave)) return true; + // if no time is specified, then + // - delete deletes any envelope in selected tracks. + // - value is not set for any clip + WaveTrack *waveTrack = static_cast(t); WaveClipPointers ptrs( waveTrack->SortedClipArray()); for(auto it = ptrs.begin(); (it != ptrs.end()); it++ ){ diff --git a/src/commands/SetTrackInfoCommand.cpp b/src/commands/SetTrackInfoCommand.cpp index 042b987c7..3c4edbe22 100644 --- a/src/commands/SetTrackInfoCommand.cpp +++ b/src/commands/SetTrackInfoCommand.cpp @@ -109,7 +109,7 @@ bool SetTrackBase::Apply(const CommandContext & context ) bool SetTrackStatusCommand::DefineParams( ShuttleParams & S ){ SetTrackBase::DefineParams( S ); - S.OptionalN( bHasTrackName ).Define( mTrackName, wxT("Name"), wxT("Unnamed") ); + S.OptionalN( bHasTrackName ).Define( mTrackName, wxT("Name"), _("Unnamed") ); // There is also a select command. This is an alternative. S.OptionalN( bHasSelected ).Define( bSelected, wxT("Selected"), false ); S.OptionalN( bHasFocused ).Define( bFocused, wxT("Focused"), false );