fixed service editing for custom nodes, fixed hiding picker when clicking edit custom nodes
This commit is contained in:
parent
78f44e8110
commit
5bf0a2ac05
2 changed files with 5 additions and 3 deletions
|
@ -15,7 +15,7 @@ class ServicesSelectDialog(Dialog):
|
||||||
self.groups = None
|
self.groups = None
|
||||||
self.services = None
|
self.services = None
|
||||||
self.current = None
|
self.current = None
|
||||||
self.current_services = current_services
|
self.current_services = set(current_services)
|
||||||
self.draw()
|
self.draw()
|
||||||
|
|
||||||
def draw(self):
|
def draw(self):
|
||||||
|
@ -48,7 +48,7 @@ class ServicesSelectDialog(Dialog):
|
||||||
frame.grid(stick="ew")
|
frame.grid(stick="ew")
|
||||||
for i in range(2):
|
for i in range(2):
|
||||||
frame.columnconfigure(i, weight=1)
|
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.grid(row=0, column=0, sticky="ew")
|
||||||
button = tk.Button(frame, text="Cancel", command=self.click_cancel)
|
button = tk.Button(frame, text="Cancel", command=self.click_cancel)
|
||||||
button.grid(row=0, column=1, sticky="ew")
|
button.grid(row=0, column=1, sticky="ew")
|
||||||
|
@ -174,7 +174,8 @@ class CustomNodesDialog(Dialog):
|
||||||
dialog = ServicesSelectDialog(self, self.app, self.services)
|
dialog = ServicesSelectDialog(self, self.app, self.services)
|
||||||
dialog.show()
|
dialog.show()
|
||||||
if dialog.current_services is not None:
|
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):
|
def click_save(self):
|
||||||
self.app.config["nodes"].clear()
|
self.app.config["nodes"].clear()
|
||||||
|
|
|
@ -232,6 +232,7 @@ class Toolbar(tk.Frame):
|
||||||
self.app.canvas.mode = GraphMode.EDGE
|
self.app.canvas.mode = GraphMode.EDGE
|
||||||
|
|
||||||
def click_edit_node(self):
|
def click_edit_node(self):
|
||||||
|
self.hide_pickers()
|
||||||
dialog = CustomNodesDialog(self.app, self.app)
|
dialog = CustomNodesDialog(self.app, self.app)
|
||||||
dialog.show()
|
dialog.show()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue