summaryrefslogtreecommitdiff
path: root/container.py
diff options
context:
space:
mode:
authorlucaszhao192020-02-20 15:07:10 +0530
committerlucaszhao192020-02-20 15:07:10 +0530
commitbb1f0b5823a2792b65600505934979367c8a6028 (patch)
treeed725791fd3517e9b15bba645c37ff8984be0ee3 /container.py
parentdf141f35dccc6b21fcfa575707c6435a39d0002f (diff)
downloadChemical-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.py15
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: