diff --git a/src/simudator/processor/mia/gui/bus_graphic.py b/src/simudator/processor/mia/gui/bus_graphic.py index 476a14d19eab26fe06b80b2997fd9df0e19f0de8..f2482ac08420ccf47b6440f1a95bf0973e6e6673 100644 --- a/src/simudator/processor/mia/gui/bus_graphic.py +++ b/src/simudator/processor/mia/gui/bus_graphic.py @@ -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