diff options
author | lucaszhao19 | 2020-02-20 15:07:10 +0530 |
---|---|---|
committer | lucaszhao19 | 2020-02-20 15:07:10 +0530 |
commit | bb1f0b5823a2792b65600505934979367c8a6028 (patch) | |
tree | ed725791fd3517e9b15bba645c37ff8984be0ee3 /container.py | |
parent | df141f35dccc6b21fcfa575707c6435a39d0002f (diff) | |
download | Chemical-Simulator-GUI-bb1f0b5823a2792b65600505934979367c8a6028.tar.gz Chemical-Simulator-GUI-bb1f0b5823a2792b65600505934979367c8a6028.tar.bz2 Chemical-Simulator-GUI-bb1f0b5823a2792b65600505934979367c8a6028.zip |
DockWidgets and NodeItems positioning fixed
Diffstat (limited to 'container.py')
-rw-r--r-- | container.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/container.py b/container.py index 6b4bcbe..6f9b0cd 100644 --- a/container.py +++ b/container.py @@ -1,5 +1,5 @@ from OMChem.Flowsheet import Flowsheet -from component_selector import * +from ComponentSelector import * from collections import defaultdict from PyQt5.QtCore import * from PyQt5.QtWidgets import * @@ -69,11 +69,12 @@ class Container(): # def addUnitOpObj(obj): # self.unitOp.append(obj) - def addUnitOp(self,obj): + def addUnitOp(self,obj, graphicsView): box = None self.obj = obj self.scene = self.graphics.getScene() - box = self.graphics.createNodeItem(self.obj, self) + self.graphicsView = graphicsView + box = self.graphics.createNodeItem(self.obj, self, self.graphicsView) self.scene.addItem(box) box.setPos(2500-30, 2500-30) @@ -92,6 +93,14 @@ class Container(): def delete(self,l): for item in l: self.scene.removeItem(item) + for i in dockWidgetLst: + if i.name == item.name: + i.hide() + del i + break + for i in dockWidgetLst: + print(i.name) + print("delete ", dockWidgetLst) if hasattr(item,'Input'): for x in item.Input: if x.newLine: |