개정판 c6db5d47
issue #000: fix scene conn now update point
Change-Id: Iea4d3983a24735aab3e4a5e83d0d71e2d6d8a4aa
DTI_PID/DTI_PID/QtImageViewer.py | ||
---|---|---|
606 | 606 |
|
607 | 607 |
svg.transfer.onRemoved.connect(self.mainWindow.itemRemoved) |
608 | 608 |
|
609 |
for conn in svg.connectors: |
|
610 |
conn.sceneConnectPoint = (conn.sceneBoundingRect().center().x(), conn.sceneBoundingRect().center().y()) |
|
611 |
|
|
609 | 612 |
self.scene.clearFocus() |
610 | 613 |
for item in self.scene.selectedItems(): |
611 | 614 |
item.setSelected(False) |
DTI_PID/DTI_PID/Shapes/SymbolSvgItem.py | ||
---|---|---|
415 | 415 |
self.connectors[index].sceneConnectPoint = (connPts[index][0], connPts[index][1]) if len(connPts[index]) == 2 else \ |
416 | 416 |
(connPts[index][1], connPts[index][2]) if len(connPts[index]) == 3 else \ |
417 | 417 |
(connPts[index][1], connPts[index][2]) if len(connPts[index]) == 4 else None |
418 |
#print((x, y)) |
|
419 |
#print(self.connectors[index].sceneConnectPoint) |
|
418 | 420 |
|
419 | 421 |
self.parentSymbol = parentSymbol |
420 | 422 |
self.childSymbol = childSymbol |
... | ... | |
1442 | 1444 |
line = connector.connectedItem |
1443 | 1445 |
line.reDrawLine(self, connector.center()) |
1444 | 1446 |
|
1447 |
for conn in self.connectors: |
|
1448 |
conn.sceneConnectPoint = (conn.sceneBoundingRect().center().x(), conn.sceneBoundingRect().center().y()) |
|
1445 | 1449 |
|
1446 | 1450 |
''' |
1447 | 1451 |
@brief change Conn point |
내보내기 Unified diff