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

Fix defaults for unchosen optional values.

Previously when using a scriptable via dialog the unchosen optional values from the dialog were still being used.
Now unchosen options are reset to their default values, if they would be used.
This commit is contained in:
James Crook
2018-03-22 19:19:59 +00:00
parent 975e95abad
commit 2f89c57b18
5 changed files with 38 additions and 1 deletions

View File

@@ -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 );