Skip to content

Commit

Permalink
Make sure Single Line checkbox does as advertised.
Browse files Browse the repository at this point in the history
  • Loading branch information
LettError committed Sep 12, 2023
1 parent bd9e1da commit ea659c7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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"))
Expand Down

0 comments on commit ea659c7

Please sign in to comment.