개정판 6067f4b2
issue #000: fix line drawing
Change-Id: I23b4232ed091be77233a4f5789c3f58df5c009d3
DTI_PID/DTI_PID/MainWindow.py | ||
---|---|---|
1584 | 1584 |
pt = lineItem.startPoint() |
1585 | 1585 |
selected = [item for item in self.graphicsView.scene.items(QPointF(pt[0], pt[1])) if |
1586 | 1586 |
type(item) is QEngineeringConnectorItem or type(item) is QEngineeringLineItem] |
1587 |
if selected: |
|
1587 |
if selected and selected[0] is not lineItem:
|
|
1588 | 1588 |
if type(selected[0]) is QEngineeringConnectorItem: |
1589 | 1589 |
lineItem.connect_if_possible(selected[0].parent, 5) |
1590 | 1590 |
else: |
... | ... | |
1596 | 1596 |
pt = items[-1].endPoint() |
1597 | 1597 |
selected = [item for item in self.graphicsView.scene.items(QPointF(pt[0], pt[1])) if |
1598 | 1598 |
(type(item) is QEngineeringConnectorItem and item.parent is not items[-1]) or type(item) is QEngineeringLineItem] |
1599 |
if selected: |
|
1599 |
if selected and selected[0] is not items[-1]:
|
|
1600 | 1600 |
if type(selected[0]) is QEngineeringConnectorItem: |
1601 | 1601 |
items[-1].connect_if_possible(selected[0].parent, 5) |
1602 | 1602 |
else: |
내보내기 Unified diff