Skip to content
Snippets Groups Projects
Commit 43b1ece1 authored by Oscar Gustafsson's avatar Oscar Gustafsson :bicyclist:
Browse files

Add default values to callbacks

parent 0fc40d46
No related branches found
No related tags found
No related merge requests found
Pipeline #88100 passed
......@@ -122,7 +122,7 @@ class DragButton(QPushButton):
self._window.graphic_view.update()
super().mouseReleaseEvent(event)
def _flip(self, event):
def _flip(self, event=None):
self._flipped = not self._flipped
for pb in self.ports:
if isinstance(pb.port, InputPort):
......
......@@ -216,16 +216,14 @@ class MainWindow(QMainWindow):
self.logger.info(f"Saved SFG to path: {module}.")
def save_work(self, arg):
print("Save: ", arg)
def save_work(self, event=None):
self.sfg_widget = SelectSFGWindow(self)
self.sfg_widget.show()
# Wait for input to dialog.
self.sfg_widget.ok.connect(self._save_work)
def load_work(self, arg):
print("Load: ", arg)
def load_work(self, event=None):
module, accepted = QFileDialog().getOpenFileName()
if not accepted:
return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment