summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorBradley Sepos <[email protected]>2018-02-01 08:33:34 -0500
committerBradley Sepos <[email protected]>2018-03-17 17:01:55 -0400
commitc56d4eeb65b978dd84d2b0efa8851985bf62db59 (patch)
treef0c5f382743acda47ff43c8ec4982aef65850d13 /macosx
parente7f78cb1cf6ecafe60dd259c9aee9640c8d302cd (diff)
MacGUI: Update main window preset control when renaming via popover.
Diffstat (limited to 'macosx')
-rw-r--r--macosx/English.lproj/Presets.xib7
-rw-r--r--macosx/HBController.m5
-rw-r--r--macosx/HBPresetsViewController.m9
3 files changed, 15 insertions, 6 deletions
diff --git a/macosx/English.lproj/Presets.xib b/macosx/English.lproj/Presets.xib
index 6dde03dae..7487802b0 100644
--- a/macosx/English.lproj/Presets.xib
+++ b/macosx/English.lproj/Presets.xib
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="13770" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="13771" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="macosx"/>
<development version="8000" identifier="xcode"/>
- <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="13770"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="13771"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@@ -61,6 +61,9 @@ Overrides all encode settings. Settings may be further adjusted after selecting
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+ <connections>
+ <action selector="renamed:" target="-2" id="ZKl-KQ-seA"/>
+ </connections>
</textFieldCell>
<connections>
<binding destination="czB-kB-CXf" name="editable" keyPath="objectValue.isBuiltIn" id="ynB-cm-NHg">
diff --git a/macosx/HBController.m b/macosx/HBController.m
index 5a7f1ce37..94ab56306 100644
--- a/macosx/HBController.m
+++ b/macosx/HBController.m
@@ -1367,10 +1367,7 @@
- (void)selectionDidChange
{
- if (fPresetsView.selectedPreset != self.currentPreset || self.edited)
- {
- [self applyPreset:fPresetsView.selectedPreset];
- }
+ [self applyPreset:fPresetsView.selectedPreset];
}
#pragma mark - Presets
diff --git a/macosx/HBPresetsViewController.m b/macosx/HBPresetsViewController.m
index 2e44985f6..4e52ad1a9 100644
--- a/macosx/HBPresetsViewController.m
+++ b/macosx/HBPresetsViewController.m
@@ -249,6 +249,15 @@ static void *HBPresetsViewControllerContext = &HBPresetsViewControllerContext;
}
}
+- (IBAction)renamed:(id)sender
+{
+ if (self.delegate && [[self.treeController.selectedObjects firstObject] isLeaf])
+ {
+ [self.delegate selectionDidChange];
+ [[NSNotificationCenter defaultCenter] postNotificationName:HBPresetsChangedNotification object:nil];
+ }
+}
+
- (IBAction)addNewPreset:(id)sender
{
if (self.delegate)