Skip to content

Commit

Permalink
remove delay for no reason
Browse files Browse the repository at this point in the history
  • Loading branch information
FraidOfWater authored Nov 11, 2024
1 parent a7bdacc commit a999d8a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,6 @@ def displayimage(self, frame, flag=True): #Create secondary window for image vie

self.enter_toggle = False
self.Image_frame.canvas.focus_set()
#self.current_selection.focus_set()
return

# Standalone image viewer
Expand Down Expand Up @@ -838,10 +837,9 @@ def displayimage(self, frame, flag=True): #Create secondary window for image vie
self.show_next_method(frame)

if not self.show_next.get():
self.second_window.after(100, lambda: self.Image_frame.canvas.focus_set())
self.second_window.after(0, lambda: self.Image_frame.canvas.focus_set())
else:
self.second_window.after(100, lambda: self.Image_frame.canvas.focus_set())
#self.current_selection.focus_set()
self.second_window.after(0, lambda: self.Image_frame.canvas.focus_set())

def show_next_method(self, frame): # Record current and last gridsquares that have been "selected". Change their colours.
self.current_selection = frame # Update current_selection
Expand All @@ -865,6 +863,7 @@ def save_viewer_geometry(self, event=None):
self.Image_frame.close_window()
self.after(0, self.Image_frame.destroy) # Gives it time to close
del self.Image_frame
#if the viewer is closed when show next is on, disable show next.

def filedialogselect(self, target, type):
if type == "d":
Expand Down

0 comments on commit a999d8a

Please sign in to comment.