Skip to content

Commit

Permalink
Added icon to snap-to-edge tool
Browse files Browse the repository at this point in the history
  • Loading branch information
jvdwetering committed Aug 1, 2024
1 parent ac2d41a commit 6720156
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
5 changes: 3 additions & 2 deletions zxlive/editor_base_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,9 @@ def toolbar_select_node_edge(parent: EditorBasePanel) -> Iterator[ToolbarSection
snap = QToolButton(parent)
snap.setCheckable(True)
snap.setChecked(True)
snap.setText("Vertex-edge snap")
snap.setToolTip("Snap newly added vertex to the edge beneath it (f)")
#snap.setText("Vertex-edge snap")
snap.setIcon(QIcon(get_data("icons/vertex-snap-to-edge.svg")))
snap.setToolTip("Snap newly added vertices to the edge beneath them (f)")
snap.setShortcut("f")
snap.clicked.connect(lambda: parent._snap_vertex_edge_clicked())
yield ToolbarSection(snap)
Expand Down
2 changes: 0 additions & 2 deletions zxlive/eitem.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,6 @@ def __init__(self, item: Union[EItem, ET], property: EItem.Properties,
self.e = None
self._it = None
self.scene: Optional[GraphScene] = None
#if refresh and property != VItem.Properties.Position:
# raise ValueError("Only position animations require refresh")
if isinstance(item, EItem):
self._it = item
elif scene is None:
Expand Down
11 changes: 11 additions & 0 deletions zxlive/icons/vertex-snap-to-edge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6720156

Please sign in to comment.