Skip to content

Commit

Permalink
Re-enable buttons after delay
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam committed Nov 19, 2022
1 parent 8d138d2 commit b9c7a7f
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/AutoSplit.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,16 +582,23 @@ def __auto_splitter(self):
if split_delay > 0 and not self.waiting_for_split_delay:
split_time = round(time() + split_delay * 1000)
self.waiting_for_split_delay = True
self.next_image_button.setEnabled(False)
self.previous_image_button.setEnabled(False)
self.undo_split_button.setEnabled(False)
self.skip_split_button.setEnabled(False)
buttons_to_disable = [
self.next_image_button,
self.previous_image_button,
self.undo_split_button,
self.skip_split_button,
]
for button in buttons_to_disable:
button.setEnabled(False)
self.current_image_file_label.clear()

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

for button in buttons_to_disable:
button.setEnabled(True)

self.waiting_for_split_delay = False

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

0 comments on commit b9c7a7f

Please sign in to comment.