From f7fc996905672a546c056918f1fa843a4431e0b0 Mon Sep 17 00:00:00 2001 From: "Anders H. Rebner" <anderhre@stud.ntnu.no> Date: Sun, 22 Mar 2020 09:57:29 +0100 Subject: [PATCH] #39 La til beskrivelse av SOIWorkspaceWidgets nye initparameter soi --- soitool/soi_workspace_widget.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/soitool/soi_workspace_widget.py b/soitool/soi_workspace_widget.py index 96181c5..c080466 100644 --- a/soitool/soi_workspace_widget.py +++ b/soitool/soi_workspace_widget.py @@ -20,13 +20,16 @@ from soitool.modules.module_table import TableModule class SOIWorkspaceWidget(QWidget): """Contains the working area for a single SOI. + Creates a new SOI by default, but can receive an existing SOI through + it's init parameter 'soi'. + The widget is used inside tabs in our application, and contains a sidebar with a module list along with a view of the SOI. """ - def __init__(self, existing_soi=None): + def __init__(self, soi=None): super().__init__() - if existing_soi is None: + if soi is None: # NOTE # * test modules, just to have something show up on screen # * not valid until reorganize has been run, as the positions must @@ -59,7 +62,7 @@ class SOIWorkspaceWidget(QWidget): modules=initial_modules, attachments=initial_attachments ) else: - self.soi = existing_soi + self.soi = soi self.soi.reorganize() -- GitLab