]> granicus.if.org Git - handbrake/commitdiff
MacGUI: Select newly saved preset on creation.
authorBradley Sepos <bradley@bradleysepos.com>
Sat, 17 Mar 2018 22:16:20 +0000 (18:16 -0400)
committerBradley Sepos <bradley@bradleysepos.com>
Sat, 17 Mar 2018 22:16:20 +0000 (18:16 -0400)
macosx/HBController.m

index ee452bf978eceb2d1907d025a6ce023bea522bf1..15ea6bd07d4e05ffd03a24d7b3970ca376ae8955 100644 (file)
 - (void)sheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo
 {
     __unused HBAddPresetController *addPresetController = (HBAddPresetController *)CFBridgingRelease(contextInfo);
+
+    if (returnCode == NSModalResponseContinue)
+    {
+        fPresetsView.selectedPreset = addPresetController.preset;
+        [self applyPreset:fPresetsView.selectedPreset];
+        [[NSNotificationCenter defaultCenter] postNotificationName:HBPresetsChangedNotification object:nil];
+    }
 }
 
 - (HBPreset *)createPresetFromCurrentSettings