From ea659c717dedb1e5a0ed1e151ede93724e8eab59 Mon Sep 17 00:00:00 2001 From: Erik van Blokland Date: Tue, 12 Sep 2023 17:26:22 +0200 Subject: [PATCH] Make sure Single Line checkbox does as advertised. --- .../lib/designspaceEditor/instancesPreview.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DesignspaceEditor2.roboFontExt/lib/designspaceEditor/instancesPreview.py b/DesignspaceEditor2.roboFontExt/lib/designspaceEditor/instancesPreview.py index b634f1e..11a9ec1 100644 --- a/DesignspaceEditor2.roboFontExt/lib/designspaceEditor/instancesPreview.py +++ b/DesignspaceEditor2.roboFontExt/lib/designspaceEditor/instancesPreview.py @@ -29,7 +29,7 @@ def build(self, operator=None, selectedInstances=None, previewString=""): self.w = vanilla.FloatingWindow((700, 400), "Instances Preview", minSize=(500, 300)) self.w.input = vanilla.EditText((10, 10, -120, 22), callback=self.inputCallback) - self.w.singleLine = vanilla.CheckBox((-100, 10, 100, 22), "Single line", value=True, callback=self.singleLineCheckboxCallback) + self.w.singleLine = vanilla.CheckBox((-100, 10, 100, 22), "Single line", value=0, callback=self.singleLineCheckboxCallback) self.w.hl = vanilla.HorizontalLine((0, 41, 0, 1)) self.w.preview = MultiLineView((0, 42, 0, 0), pointSize=60, displayOptions=dict(Beam=False, displayMode="Multi Line", Stroke=False, Fill=True)) self.w.preview.setFont(dummyFont) @@ -86,7 +86,7 @@ def inputCallback(self, sender): designspaceEditorInstancesDidChangeDelay = 0.1 def singleLineCheckboxCallback(self, sender): - if sender.get(): + if sender.get()==0: self.w.preview.setDisplayStates(dict(displayMode="Multi Line")) else: self.w.preview.setDisplayStates(dict(displayMode="Single Line"))