Skip to content

Commit

Permalink
vitem rotation should be set when graph is updated
Browse files Browse the repository at this point in the history
  • Loading branch information
RazinShaikh committed Aug 19, 2023
1 parent c29c8ac commit 306754b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions zxlive/graphscene.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,9 @@ def update_graph(self, new: GraphT, select_new: bool = False) -> None:
self.addItem(e_item)
self.addItem(e_item.selection_node)

# So we only have to make sure that the existing vertices and edges
# are updated to match the new graph structure
for v in diff.new_verts:
self.vertex_map[v].set_vitem_rotation()

for v in diff.changed_vertex_types:
self.vertex_map[v].refresh()

Expand All @@ -156,6 +157,7 @@ def update_graph(self, new: GraphT, select_new: bool = False) -> None:
for anim in v_item.active_animations.copy():
anim.stop()
v_item.set_pos_from_graph()
v_item.set_vitem_rotation()

for e in diff.changed_edge_types:
self.edge_map[e].refresh()
Expand Down

0 comments on commit 306754b

Please sign in to comment.