Skip to content

Commit

Permalink
Add save_shortcuts() calls after adding and deleting shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
LyubomirT committed Mar 21, 2024
1 parent 321f65e commit 5fab6f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wincuts.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ def save_shortcuts(self, file_name):

def add_shortcut(self, keys, command, open_in_window):
self.shortcuts.append([keys, command, open_in_window])
self.save_shortcuts("validated.dat") # Save shortcuts after adding

def delete_shortcut(self, index):
del self.shortcuts[index]
self.save_shortcuts("validated.dat") # Save shortcuts after deleting

class ShortcutEditor(QWidget):
def __init__(self, shortcut_manager, main_window):
Expand Down Expand Up @@ -174,7 +176,6 @@ def closeEvent(self, event):
self.hide()

def quit(self):
self.shortcut_manager.save_shortcuts("validated.dat")
QApplication.quit()

def execute_command(self, command, open_in_window):
Expand Down

0 comments on commit 5fab6f4

Please sign in to comment.