From 25341b4f0c95f404b2acbeb4d23c3decb2a8f346 Mon Sep 17 00:00:00 2001 From: sumit Date: Sat, 30 May 2020 17:08:18 +0530 Subject: change add line for undo --- src/main/python/shapes/shapes.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/main/python/shapes/shapes.py b/src/main/python/shapes/shapes.py index 7db759c..19c0298 100644 --- a/src/main/python/shapes/shapes.py +++ b/src/main/python/shapes/shapes.py @@ -223,7 +223,7 @@ class LineGripItem(GripItem): # initialize a line and add on scene startPoint = endPoint = self.parentItem().mapToScene(self.pos()) self.tempLine = Line(startPoint, endPoint) - self.scene().addItem(self.tempLine) + self.scene().addItemPlus(self.tempLine) super().mousePressEvent(mouseEvent) def mouseMoveEvent(self, mouseEvent): @@ -297,6 +297,7 @@ class NodeItem(QGraphicsSvgItem): def __init__(self, unitOperationType, parent=None): QGraphicsSvgItem.__init__(self, parent) + self.m_type = unitOperationType self.id = None self.m_renderer = NodeItem.renderer # if each svg is seperate file @@ -616,9 +617,9 @@ class InducedDraftCooling(NodeItem): super(InducedDraftCooling, self).__init__("InducedDraftCooling", parent=None) -class jacketedMixingVessel(NodeItem): +class JacketedMixingVessel(NodeItem): def __init__(self): - super(jacketedMixingVessel, self).__init__("jacketedMixingVessel", parent=None) + super(JacketedMixingVessel, self).__init__("JacketedMixingVessel", parent=None) class LiquidRingCompressor(NodeItem): -- cgit