diff options
author | dynaflash <[email protected]> | 2007-12-07 18:26:08 +0000 |
---|---|---|
committer | dynaflash <[email protected]> | 2007-12-07 18:26:08 +0000 |
commit | 7c2212afd586be25977179059bbe6870e5ab0007 (patch) | |
tree | 61e671c9802f261a32c230f8af124defdf9883b7 /macosx | |
parent | 8cf05fac1251aca178c52e6cd4c61456fd662f9a (diff) |
MacGui: fix issue in which picture settings filters in presets would'nt set to "off" if the preset didnt have the key for that filter.
- If a filter is not detected in the preset, the preset will assume it should be set to Off or None as the case may be.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1104 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/Controller.mm | 106 |
1 files changed, 76 insertions, 30 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm index 9baa49974..37a68df18 100644 --- a/macosx/Controller.mm +++ b/macosx/Controller.mm @@ -3248,31 +3248,54 @@ the user is using "Custom" settings by determining the sender*/ if (![chosenPreset objectForKey:@"UsesPictureFilters"]) { /* Filters */ - [fPictureController setDeinterlace:[[chosenPreset objectForKey:@"PictureDeinterlace"] intValue]]; - + /* Deinterlace */ + if ([chosenPreset objectForKey:@"PictureDeinterlace"]) + { + [fPictureController setDeinterlace:[[chosenPreset objectForKey:@"PictureDeinterlace"] intValue]]; + } + else + { + [fPictureController setDeinterlace:0]; + } + /* VFR */ if ([[chosenPreset objectForKey:@"VFR"] intValue] == 1) { [fPictureController setVFR:[[chosenPreset objectForKey:@"VFR"] intValue]]; } else { - [fPictureController setVFR:0]; + [fPictureController setVFR:0]; } - - if ([chosenPreset objectForKey:@"PictureDetelecine"]) + /* Detelecine */ + if ([[chosenPreset objectForKey:@"PictureDetelecine"] intValue] == 1) { [fPictureController setDetelecine:[[chosenPreset objectForKey:@"PictureDetelecine"] intValue]]; } + else + { + [fPictureController setDetelecine:0]; + } + /* Denoise */ if ([chosenPreset objectForKey:@"PictureDenoise"]) { [fPictureController setDenoise:[[chosenPreset objectForKey:@"PictureDenoise"] intValue]]; } - if ([chosenPreset objectForKey:@"PictureDeblock"]) + else + { + [fPictureController setDenoise:0]; + } + /* Deblock */ + if ([[chosenPreset objectForKey:@"PictureDeblock"] intValue] == 1) { [fPictureController setDeblock:[[chosenPreset objectForKey:@"PictureDeblock"] intValue]]; + } + else + { + [fPictureController setDeblock:0]; } - [self calculatePictureSizing: NULL]; - } + + [self calculatePictureSizing: NULL]; + } } @@ -3284,28 +3307,51 @@ the user is using "Custom" settings by determining the sender*/ if ([chosenPreset objectForKey:@"UsesPictureFilters"] && [[chosenPreset objectForKey:@"UsesPictureFilters"] intValue] > 0) { /* Filters */ - [fPictureController setDeinterlace:[[chosenPreset objectForKey:@"PictureDeinterlace"] intValue]]; - if ([chosenPreset objectForKey:@"VFR"]) - { - [fPictureController setVFR:[[chosenPreset objectForKey:@"VFR"] intValue]]; - } - else - { - [fPictureController setVFR:0]; - } - if ([chosenPreset objectForKey:@"PictureDetelecine"]) - { - [fPictureController setDetelecine:[[chosenPreset objectForKey:@"PictureDetelecine"] intValue]]; - } - if ([chosenPreset objectForKey:@"PictureDenoise"]) - { - [fPictureController setDenoise:[[chosenPreset objectForKey:@"PictureDenoise"] intValue]]; - } - if ([chosenPreset objectForKey:@"PictureDeblock"]) - { - [fPictureController setDeblock:[[chosenPreset objectForKey:@"PictureDeblock"] intValue]]; - } - } + /* Deinterlace */ + if ([chosenPreset objectForKey:@"PictureDeinterlace"]) + { + [fPictureController setDeinterlace:[[chosenPreset objectForKey:@"PictureDeinterlace"] intValue]]; + } + else + { + [fPictureController setDeinterlace:0]; + } + /* VFR */ + if ([[chosenPreset objectForKey:@"VFR"] intValue] == 1) + { + [fPictureController setVFR:[[chosenPreset objectForKey:@"VFR"] intValue]]; + } + else + { + [fPictureController setVFR:0]; + } + /* Detelecine */ + if ([[chosenPreset objectForKey:@"PictureDetelecine"] intValue] == 1) + { + [fPictureController setDetelecine:[[chosenPreset objectForKey:@"PictureDetelecine"] intValue]]; + } + else + { + [fPictureController setDetelecine:0]; + } + /* Denoise */ + if ([chosenPreset objectForKey:@"PictureDenoise"]) + { + [fPictureController setDenoise:[[chosenPreset objectForKey:@"PictureDenoise"] intValue]]; + } + else + { + [fPictureController setDenoise:0]; + } + /* Deblock */ + if ([[chosenPreset objectForKey:@"PictureDeblock"] intValue] == 1) + { + [fPictureController setDeblock:[[chosenPreset objectForKey:@"PictureDeblock"] intValue]]; + } + else + { + [fPictureController setDeblock:0]; + } } [self calculatePictureSizing: NULL]; [[fPresetsActionMenu itemAtIndex:0] setEnabled: YES]; } |