diff --git a/coretk/coretk/dialogs/customnodes.py b/coretk/coretk/dialogs/customnodes.py index e98b8c77..20c5ae95 100644 --- a/coretk/coretk/dialogs/customnodes.py +++ b/coretk/coretk/dialogs/customnodes.py @@ -15,7 +15,7 @@ class ServicesSelectDialog(Dialog): self.groups = None self.services = None self.current = None - self.current_services = current_services + self.current_services = set(current_services) self.draw() def draw(self): @@ -48,7 +48,7 @@ class ServicesSelectDialog(Dialog): frame.grid(stick="ew") for i in range(2): frame.columnconfigure(i, weight=1) - button = tk.Button(frame, text="Save", command=self.click_cancel) + button = tk.Button(frame, text="Save", command=self.destroy) button.grid(row=0, column=0, sticky="ew") button = tk.Button(frame, text="Cancel", command=self.click_cancel) button.grid(row=0, column=1, sticky="ew") @@ -174,7 +174,8 @@ class CustomNodesDialog(Dialog): dialog = ServicesSelectDialog(self, self.app, self.services) dialog.show() if dialog.current_services is not None: - self.services = dialog.current_services + self.services.clear() + self.services.update(dialog.current_services) def click_save(self): self.app.config["nodes"].clear() diff --git a/coretk/coretk/toolbar.py b/coretk/coretk/toolbar.py index 015d2ad6..5b2c83bd 100644 --- a/coretk/coretk/toolbar.py +++ b/coretk/coretk/toolbar.py @@ -232,6 +232,7 @@ class Toolbar(tk.Frame): self.app.canvas.mode = GraphMode.EDGE def click_edit_node(self): + self.hide_pickers() dialog = CustomNodesDialog(self.app, self.app) dialog.show()