new connection editing
This commit is contained in:
@@ -92,6 +92,7 @@ class MainWindow(QMainWindow):
|
||||
self.ui.graphView.selectionAvailabilityChanged.connect(
|
||||
lambda _available: self._update_edit_actions()
|
||||
)
|
||||
self.ui.graphView.toolModeShortcutRequested.connect(self.set_graph_tool)
|
||||
self.mode_button_group = QButtonGroup(self)
|
||||
self.mode_button_group.setExclusive(True)
|
||||
self.mode_button_group.addButton(self.ui.pointerToolButton)
|
||||
@@ -99,14 +100,6 @@ class MainWindow(QMainWindow):
|
||||
self.mode_button_group.addButton(self.ui.boxToolButton)
|
||||
self.mode_button_group.addButton(self.ui.lineToolButton)
|
||||
self.mode_button_group.addButton(self.ui.textToolButton)
|
||||
self.routing_button_group = QButtonGroup(self)
|
||||
self.routing_button_group.setExclusive(True)
|
||||
for button in (
|
||||
self.ui.directRoutingButton,
|
||||
self.ui.angledRoutingButton,
|
||||
self.ui.splineRoutingButton,
|
||||
):
|
||||
self.routing_button_group.addButton(button)
|
||||
self.ui.navigateUpButton.clicked.connect(self.navigate_up)
|
||||
self.ui.navigateDownButton.clicked.connect(self.navigate_down)
|
||||
self.ui.pointerToolButton.clicked.connect(lambda: self.set_graph_tool("pointer"))
|
||||
@@ -115,9 +108,6 @@ class MainWindow(QMainWindow):
|
||||
self.ui.lineToolButton.clicked.connect(lambda: self.set_graph_tool("line"))
|
||||
self.ui.textToolButton.clicked.connect(lambda: self.set_graph_tool("text"))
|
||||
self.ui.rotateToolButton.clicked.connect(self.ui.graphView.rotate_selected)
|
||||
self.ui.directRoutingButton.clicked.connect(lambda: self.set_connection_routing("direct"))
|
||||
self.ui.angledRoutingButton.clicked.connect(lambda: self.set_connection_routing("angled"))
|
||||
self.ui.splineRoutingButton.clicked.connect(lambda: self.set_connection_routing("spline"))
|
||||
self.ui.applyJsonButton.clicked.connect(self.apply_json)
|
||||
self.document_controller.activeGraphChanged.connect(self._active_graph_changed)
|
||||
|
||||
@@ -255,10 +245,6 @@ class MainWindow(QMainWindow):
|
||||
self.ui.lineToolButton,
|
||||
self.ui.textToolButton,
|
||||
self.ui.rotateToolButton,
|
||||
self.ui.routingLabel,
|
||||
self.ui.directRoutingButton,
|
||||
self.ui.angledRoutingButton,
|
||||
self.ui.splineRoutingButton,
|
||||
):
|
||||
widget.setVisible(visible)
|
||||
|
||||
@@ -272,15 +258,6 @@ class MainWindow(QMainWindow):
|
||||
"text": self.ui.textToolButton,
|
||||
}[mode].setChecked(True)
|
||||
|
||||
def set_connection_routing(self, routing: str) -> None:
|
||||
self.ui.graphView.set_connection_routing(routing)
|
||||
buttons = {
|
||||
"direct": self.ui.directRoutingButton,
|
||||
"angled": self.ui.angledRoutingButton,
|
||||
"spline": self.ui.splineRoutingButton,
|
||||
}
|
||||
buttons[routing].setChecked(True)
|
||||
|
||||
def _load_source_json(self) -> None:
|
||||
component = self.document_controller.active_component
|
||||
if component is None:
|
||||
|
||||
Reference in New Issue
Block a user