fix windows issue

pull/284/head
Lex Neva 2018-08-27 16:15:58 -04:00
rodzic a636462803
commit ab656800a0
2 zmienionych plików z 9 dodań i 6 usunięć

Wyświetl plik

@ -50,10 +50,10 @@ class ControlPanel(wx.Panel):
self.restartBtn.Bind(wx.EVT_BUTTON, self.animation_restart) self.restartBtn.Bind(wx.EVT_BUTTON, self.animation_restart)
self.quitBtn = wx.Button(self, -1, label=_('Quit')) self.quitBtn = wx.Button(self, -1, label=_('Quit'))
self.quitBtn.Bind(wx.EVT_BUTTON, self.animation_quit) self.quitBtn.Bind(wx.EVT_BUTTON, self.animation_quit)
self.slider = wx.Slider(self, -1, value=1, minValue=1, maxValue=self.num_stitches, self.slider = wx.Slider(self, -1, value=1, minValue=1, maxValue=2,
style=wx.SL_HORIZONTAL | wx.SL_LABELS) style=wx.SL_HORIZONTAL | wx.SL_LABELS)
self.slider.Bind(wx.EVT_SLIDER, self.on_slider) self.slider.Bind(wx.EVT_SLIDER, self.on_slider)
self.stitchBox = IntCtrl(self, -1, value=1, min=1, max=self.num_stitches, limited=True, allow_none=False) self.stitchBox = IntCtrl(self, -1, value=1, min=1, max=2, limited=True, allow_none=False)
self.stitchBox.Bind(wx.EVT_TEXT, self.on_stitch_box) self.stitchBox.Bind(wx.EVT_TEXT, self.on_stitch_box)
self.speedST = wx.StaticText(self, -1, label='', style=wx.ALIGN_CENTER) self.speedST = wx.StaticText(self, -1, label='', style=wx.ALIGN_CENTER)
self.commandST = wx.StaticText(self, -1, label='', style=wx.ALIGN_CENTER) self.commandST = wx.StaticText(self, -1, label='', style=wx.ALIGN_CENTER)
@ -121,6 +121,9 @@ class ControlPanel(wx.Panel):
self.drawing_panel.set_speed(self.speed) self.drawing_panel.set_speed(self.speed)
def set_num_stitches(self, num_stitches): def set_num_stitches(self, num_stitches):
if num_stitches < 2:
# otherwise the slider and intctrl get mad
num_stitches = 2
self.num_stitches = num_stitches self.num_stitches = num_stitches
self.stitchBox.SetMax(num_stitches) self.stitchBox.SetMax(num_stitches)
self.slider.SetMax(num_stitches) self.slider.SetMax(num_stitches)

Wyświetl plik

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PROJECT VERSION\n" "Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2018-08-27 15:53-0400\n" "POT-Creation-Date: 2018-08-27 16:15-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -695,7 +695,7 @@ msgstr ""
msgid "COLOR CHANGE" msgid "COLOR CHANGE"
msgstr "" msgstr ""
#: lib/simulator.py:47 lib/simulator.py:195 lib/simulator.py:202 #: lib/simulator.py:47 lib/simulator.py:198 lib/simulator.py:205
msgid "Pause" msgid "Pause"
msgstr "" msgstr ""
@ -707,12 +707,12 @@ msgstr ""
msgid "Quit" msgid "Quit"
msgstr "" msgstr ""
#: lib/simulator.py:153 #: lib/simulator.py:156
#, python-format #, python-format
msgid "Speed: %d stitches/sec" msgid "Speed: %d stitches/sec"
msgstr "" msgstr ""
#: lib/simulator.py:198 #: lib/simulator.py:201
msgid "Start" msgid "Start"
msgstr "" msgstr ""