From ee730b79a067e683bab9afe9dda6e747a7a43c51 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Tue, 26 Dec 2017 18:55:49 +0100 Subject: [PATCH] Fix touchbar GUI script --- src/interaction/touchbar.mm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/interaction/touchbar.mm b/src/interaction/touchbar.mm index 6cfd74fa15..f21c0eccc7 100644 --- a/src/interaction/touchbar.mm +++ b/src/interaction/touchbar.mm @@ -166,8 +166,17 @@ NSArray* focusIdentifiers; - (void)guiButtonAction:(id)sender { (void)sender; OsEng.scriptEngine().queueScript( - "openspace.setPropertyValue('Global Properties.ImGUI.Main.Enabled', \ - not openspace.getPropertyValue('Global Properties.ImGUI.Main.Enabled'));", + "local b = openspace.getPropertyValue(\ + 'Global Properties.ImGUI.Main.Enabled'\ + );\ + openspace.setPropertyValueSingle(\ + 'Global Properties.ImGUI.Main.Enabled',\ + not b\ + );\ + openspace.setPropertyValueSingle(\ + 'Global Properties.ImGUI.Main.IsHidden',\ + b\ + );", openspace::scripting::ScriptEngine::RemoteScripting::No ); }