From 5f11d6530841fd17c59904593d2bf970b0d67ce7 Mon Sep 17 00:00:00 2001 From: Allan Odgaard Date: Fri, 30 Sep 2016 14:10:23 +0200 Subject: [PATCH] Force find/replace text fields to recreate display string MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous attempt does not work on macOS 10.12, presumably because the object value doesn’t actually change, despite the setter being invoked. --- Frameworks/Find/src/FindWindowController.mm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Frameworks/Find/src/FindWindowController.mm b/Frameworks/Find/src/FindWindowController.mm index c23951da..270e753b 100644 --- a/Frameworks/Find/src/FindWindowController.mm +++ b/Frameworks/Find/src/FindWindowController.mm @@ -919,9 +919,16 @@ static NSButton* OakCreateStopSearchButton () // Re-format current value if(!_findTextField.currentEditor) + { + _findTextField.objectValue = nil; _findTextField.objectValue = _findString; + } + if(!_replaceTextField.currentEditor) + { + _replaceTextField.objectValue = nil; _replaceTextField.objectValue = _replaceString; + } [self addStylesToFieldEditor]; }