Skip to content

Commit c12f369

Browse files
committed
Fix frame spin boxes initializing with 0 instead of Auto
1 parent ebe364b commit c12f369

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

spritesheetExporter/ui.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,15 @@ class SpinBoxes(QFormLayout):
197197
def __init__(self):
198198
super().__init__()
199199

200-
self.start = QSpinBox(value=DEFAULT_TIME, minimum=DEFAULT_TIME, maximum=9999)
201-
self.end = QSpinBox(value=DEFAULT_TIME, minimum=DEFAULT_TIME, maximum=9999)
200+
self.start = QSpinBox(minimum=DEFAULT_TIME, maximum=9999)
201+
self.end = QSpinBox(minimum=DEFAULT_TIME, maximum=9999)
202202
self.step = QSpinBox(value=1, minimum=1)
203203

204+
# It seems that if a negative value is set in the constructor, it reverts to 0,
205+
# so they're set afterward instead
206+
self.start.setValue(DEFAULT_TIME)
207+
self.end.setValue(DEFAULT_TIME)
208+
204209
for spin_box in (self.start, self.end, self.step):
205210
spin_box.setSpecialValueText("Auto")
206211

0 commit comments

Comments
 (0)