Skip to content
Snippets Groups Projects
Commit f7fc9969 authored by Anders H. Rebner's avatar Anders H. Rebner
Browse files

#39 La til beskrivelse av SOIWorkspaceWidgets nye initparameter soi

parent 519b2bd6
No related branches found
No related tags found
1 merge request!40#38 #39 Eksporter og importer SOI til/fra fil
Pipeline #76245 passed
......@@ -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()
......
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