From 06563d59539cefc9da2bcb082816a8374cda5f74 Mon Sep 17 00:00:00 2001 From: Blake Harnden <32446120+bharnden@users.noreply.github.com> Date: Sat, 1 Aug 2020 11:07:11 -0700 Subject: [PATCH] pygui: fixed issue editing hook with a new name --- daemon/core/gui/dialogs/hooks.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/daemon/core/gui/dialogs/hooks.py b/daemon/core/gui/dialogs/hooks.py index 31ef3e15..ce7caf29 100644 --- a/daemon/core/gui/dialogs/hooks.py +++ b/daemon/core/gui/dialogs/hooks.py @@ -149,13 +149,15 @@ class HooksDialog(Dialog): dialog.set(hook) dialog.show() session.hooks[hook.file] = hook + self.selected = hook.file self.listbox.delete(self.selected_index) self.listbox.insert(self.selected_index, hook.file) + self.listbox.select_set(self.selected_index) def click_delete(self) -> None: session = self.app.core.session del session.hooks[self.selected] - self.listbox.delete(tk.ANCHOR) + self.listbox.delete(self.selected_index) self.edit_button.config(state=tk.DISABLED) self.delete_button.config(state=tk.DISABLED)