Skip to content
Snippets Groups Projects
Commit 01741f44 authored by Martin Högstedt's avatar Martin Högstedt
Browse files

fixed bus being able to edit module state and breakpoint

parent a38ff246
Branches
No related tags found
1 merge request!31The bus will no longer generate 'edit module state' and 'add breakpoint' actions
Pipeline #132166 failed
......@@ -66,6 +66,19 @@ class BusGraphicsItem(ModuleGraphicsItem):
def update(self):
pass
def generateActions(self) -> None:
"""
Generates action for the bus. The only generated action is 'show all ports'.
The default implementation generates actions such as edit break points
and edit module state. Since the bus has none of those two we override the
implementation and remove those two actions.
"""
self.show_ports_action = QAction("Show all ports")
self.show_ports_action.triggered.connect(self.showPorts)
self.show_ports_action.setEnabled(not self.isLocked)
self.actions.append(self.show_ports_action)
def shouldIgnoreAction(self, action: QAction) -> bool:
"""
Disables left clicking, which would normally allow the user to
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment