Skip to content

Commit 1099cfe

Browse files
committed
Re-enable buttons after delay
1 parent 06413ab commit 1099cfe

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/AutoSplit.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -582,16 +582,23 @@ def __auto_splitter(self):
582582
if split_delay > 0 and not self.waiting_for_split_delay:
583583
split_time = round(time() + split_delay * 1000)
584584
self.waiting_for_split_delay = True
585-
self.next_image_button.setEnabled(False)
586-
self.previous_image_button.setEnabled(False)
587-
self.undo_split_button.setEnabled(False)
588-
self.skip_split_button.setEnabled(False)
585+
buttons_to_disable = [
586+
self.next_image_button,
587+
self.previous_image_button,
588+
self.undo_split_button,
589+
self.skip_split_button,
590+
]
591+
for button in buttons_to_disable:
592+
button.setEnabled(False)
589593
self.current_image_file_label.clear()
590594

591595
# check for reset while delayed and display a counter of the remaining split delay time
592596
if self.__pause_loop(split_delay, "Delayed Split:"):
593597
return
594598

599+
for button in buttons_to_disable:
600+
button.setEnabled(True)
601+
595602
self.waiting_for_split_delay = False
596603

597604
# if {p} flag hit pause key, otherwise hit split hotkey

0 commit comments

Comments
 (0)