pygui: added logic to sort canvas tabs when joining a session to organize, removed editing a nodes canvas as it currently is not supported by either gui and causes issue in the python gui due to grpc editing of a node and how values are handled
This commit is contained in:
parent
35cc8fab65
commit
313768ea56
2 changed files with 7 additions and 1 deletions
|
@ -591,7 +591,6 @@ class Session:
|
|||
:raises core.CoreError: when node to update does not exist
|
||||
"""
|
||||
node = self.get_node(node_id, NodeBase)
|
||||
node.canvas = options.canvas
|
||||
node.icon = options.icon
|
||||
self.set_node_position(node, options)
|
||||
self.sdt.edit_node(node, options.lon, options.lat, options.alt)
|
||||
|
|
|
@ -211,6 +211,13 @@ class CanvasManager:
|
|||
continue
|
||||
self.add_core_node(core_node)
|
||||
|
||||
# organize canvas tabs
|
||||
canvas_ids = sorted(self.canvases)
|
||||
for index, canvas_id in enumerate(canvas_ids):
|
||||
canvas = self.canvases[canvas_id]
|
||||
logging.info("sorting canvas index(%s) canvas(%s)", index, canvas_id)
|
||||
self.notebook.insert(index, canvas.master)
|
||||
|
||||
# draw existing links
|
||||
for link in session.links:
|
||||
node1 = self.core.get_canvas_node(link.node1_id)
|
||||
|
|
Loading…
Reference in a new issue