diff options
author | pravindalve | 2020-12-03 21:25:50 +0530 |
---|---|---|
committer | pravindalve | 2020-12-03 21:25:50 +0530 |
commit | a1a966934198e67c3a7bcc8236ed51503ae48a04 (patch) | |
tree | fe5629b984462fd3c1a78b303f65428ec4ff6204 /DockWidgets/DockWidget.py | |
parent | 37566839d914ce9e155b63d4df57daf46001d2bf (diff) | |
download | Chemical-Simulator-GUI-a1a966934198e67c3a7bcc8236ed51503ae48a04.tar.gz Chemical-Simulator-GUI-a1a966934198e67c3a7bcc8236ed51503ae48a04.tar.bz2 Chemical-Simulator-GUI-a1a966934198e67c3a7bcc8236ed51503ae48a04.zip |
Fixes for reloading saving file
Diffstat (limited to 'DockWidgets/DockWidget.py')
-rw-r--r-- | DockWidgets/DockWidget.py | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/DockWidgets/DockWidget.py b/DockWidgets/DockWidget.py index b3845bb..b3997f3 100644 --- a/DockWidgets/DockWidget.py +++ b/DockWidgets/DockWidget.py @@ -59,15 +59,13 @@ class DockWidget(QDockWidget,ui_dialog): print(i) if i == None: continue - l = QLineEdit() - if self.input_dict[i] != None: - l.setText(str(self.input_dict[i])) + l = QLineEdit(self.obj.variables[i]['value']) lay = QGridLayout() - lay.addWidget(QLabel(self.obj.variables[i]['name']+":"),0,0, alignment=Qt.AlignLeft) + lay.addWidget(QLabel(self.obj.variables[i]['name']+":"),0,0, alignment=Qt.AlignLeft) lay.addWidget(l,0,1, alignment=Qt.AlignCenter) lay.addWidget(QLabel(self.obj.variables[i]['unit']),0,2, alignment=Qt.AlignCenter) self.formLayout.addRow(lay) - self.input_dict[i] = l + self.input_dict[i] = l except Exception as e: print(e) @@ -132,7 +130,16 @@ class DockWidget(QDockWidget,ui_dialog): self.tableWidget.setItem(rowPosition , 2, QTableWidgetItem(obj.variables[val]['unit'])) self.tableWidget.resizeColumnsToContents() + # Updating result in class + obj.variables[val]['value'] = resultval + # try: + # if obj.type == "Heater": + # print(obj.variables[val]['name'] + str(obj.variables[val]['value'])) + # except Exception as e: + # print(e) + + + except Exception as e: print(e) -
\ No newline at end of file |