개정판 d4c444bd
dev issue #619: remove connectors logic in addSvgItemToScene method
DTI_PID/DTI_PID/Shapes/SymbolSvgItem.py | ||
---|---|---|
793 | 793 |
@author Jeongwoo |
794 | 794 |
@date 2018.05.03 |
795 | 795 |
@history add connectors which's parent is symbol |
796 |
kyouho 2018.07.30 remove connectors logic |
|
796 | 797 |
''' |
797 | 798 |
def addSvgItemToScene(self, scene): |
798 | 799 |
transform = QTransform() |
... | ... | |
808 | 809 |
transform.translate(self.loc[0],self.loc[1]) |
809 | 810 |
self.setTransform(transform) |
810 | 811 |
scene.addItem(self) |
811 |
|
|
812 |
# add connectors |
|
813 |
inverted,_ = transform.inverted() |
|
814 |
self.connectors.clear() |
|
815 |
for connector in self.connectors: |
|
816 |
x,y = inverted.map(connector.sceneConnectPoint[0], connector.sceneConnectPoint[1]) |
|
817 |
connector = QEngineeringConnectorItem(self) |
|
818 |
connector.setPos((x, y)) |
|
819 |
connector.setParentItem(self) |
|
820 |
self.connectors.append(connector) |
|
821 |
# up to here |
|
812 |
|
|
822 | 813 |
|
823 | 814 |
''' |
824 | 815 |
@brief |
내보내기 Unified diff