track nodes whose services have been modified by the user to differentiate between newly created nodes and default type nodes with empty services

This commit is contained in:
Huy Pham 2020-02-03 10:35:25 -08:00
parent ede9e93b52
commit 875739e748
3 changed files with 23 additions and 1 deletions

View file

@ -856,6 +856,11 @@ class CanvasGraph(tk.Canvas):
node = CanvasNode(
self.master, scaled_x, scaled_y, copy, self.nodes[canvas_nid].image
)
# add new node to modified_service_nodes set if that set contains the to_copy node
if self.app.core.service_been_modified(core_node.id):
self.app.core.modified_service_nodes.add(copy.id)
copy_map[canvas_nid] = node.id
self.core.canvas_nodes[copy.id] = node
self.nodes[node.id] = node