summaryrefslogtreecommitdiff
path: root/DockWidgets/DockWidget.py
diff options
context:
space:
mode:
authorpravindalve2020-12-03 21:25:50 +0530
committerpravindalve2020-12-03 21:25:50 +0530
commita1a966934198e67c3a7bcc8236ed51503ae48a04 (patch)
treefe5629b984462fd3c1a78b303f65428ec4ff6204 /DockWidgets/DockWidget.py
parent37566839d914ce9e155b63d4df57daf46001d2bf (diff)
downloadChemical-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.py19
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