summaryrefslogtreecommitdiffstats
path: root/macosx/HBAdvancedController.m
diff options
context:
space:
mode:
authorjbrjake <[email protected]>2007-11-09 21:44:58 +0000
committerjbrjake <[email protected]>2007-11-09 21:44:58 +0000
commit5e6725417750adb69ccbca26d1c7cbdbfd4fd142 (patch)
treee290bb4933b6b511f7936acb11f7d990bc8c17df /macosx/HBAdvancedController.m
parent4edc73cc1d426444a952cd9e10d6e139333eaded (diff)
MacGui: Fixes a small bug -- if a default value was selected twice for one of the simple integer widgets like ref frames, it'd write ref=-1 to the text field instead of writing nothing. Hopefully didn't break anything whilst fixing this.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1050 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBAdvancedController.m')
-rw-r--r--macosx/HBAdvancedController.m9
1 files changed, 6 insertions, 3 deletions
diff --git a/macosx/HBAdvancedController.m b/macosx/HBAdvancedController.m
index dc92f957b..930035574 100644
--- a/macosx/HBAdvancedController.m
+++ b/macosx/HBAdvancedController.m
@@ -774,7 +774,8 @@
}
else // we have a valid value to change, so change it
{
- thisOpt = [NSString stringWithFormat:@"%@=%d",optName,[sender indexOfSelectedItem]-1];
+ if ( [sender indexOfSelectedItem] != 0 )
+ thisOpt = [NSString stringWithFormat:@"%@=%d",optName,[sender indexOfSelectedItem]-1];
}
}
}
@@ -913,7 +914,8 @@
}
else
{
- [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@=%@",
+ if ( [sender indexOfSelectedItem] != 0 )
+ [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@=%@",
[NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"%d",[sender indexOfSelectedItem]-1]]];
}
}
@@ -1039,7 +1041,8 @@
}
else
{
- [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@:%@=%@",[NSString stringWithFormat:[fDisplayX264Options stringValue]],
+ if ( [sender indexOfSelectedItem] != 0 )
+ [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@:%@=%@",[NSString stringWithFormat:[fDisplayX264Options stringValue]],
[NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"%d",[sender indexOfSelectedItem]-1]]];
}
}