Skip to content

Commit

Permalink
Added shortcuts for loading, calculating and saving
Browse files Browse the repository at this point in the history
  • Loading branch information
Steffenhir committed Sep 30, 2023
1 parent 18778f1 commit 15fd485
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions graxpert/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,13 @@ def create_widget(self):
self.master.bind("<Control-z>", self.undo) # undo
self.master.bind("<Control-y>", self.redo) # redo
self.master.bind("<Command-z>", self.undo) # undo on macs
self.master.bind("<Command-y>", self.redo) # redo on macs
self.master.bind("<Command-y>", self.redo) # redo on macs
self.master.bind("<Control-l>", self.menu_open_clicked)
self.master.bind("<Control-c>", self.calculate)
self.master.bind("<Control-s>", self.save_image)
self.master.bind("<Command-l>", self.menu_open_clicked)
self.master.bind("<Command-c>", self.calculate)
self.master.bind("<Command-s>", self.save_image)


#Side menu
Expand Down Expand Up @@ -503,7 +509,7 @@ def update_saturation(self, event=None):
self.redraw_image()


def save_image(self):
def save_image(self, event=None):


if(self.saveas_type.get() == "16 bit Tiff" or self.saveas_type.get() == "32 bit Tiff"):
Expand Down Expand Up @@ -625,7 +631,7 @@ def reset_backgroundpts(self):
self.cmd.execute()
self.redraw_image()

def calculate(self):
def calculate(self, event=None):

if self.images["Original"] is None:
messagebox.showerror("Error", _("Please load your picture first."))
Expand Down

0 comments on commit 15fd485

Please sign in to comment.