개정판 f9176c2f
issue #1051: 장치 이동 시 가능한 라인이 직선이 되도록 한다
Change-Id: I0f2b0d8a6c383e877f4605b1952bb7d240e48a68
HYTOS/HYTOS/Shapes/SymbolSvgItem.py | ||
---|---|---|
1388 | 1388 |
""" call signals when item's position is changed """ |
1389 | 1389 |
if change == QGraphicsItem.ItemPositionHasChanged: |
1390 | 1390 |
self.transfer.on_pos_changed.emit(self) |
1391 |
""" |
|
1392 |
for conn in self.connectors: |
|
1393 |
if conn.conectedItem: |
|
1394 |
line = conn.connectedItem.parentItem() |
|
1395 |
start = line.connectors[-1].connectedItem.center() |
|
1396 |
end = line.connectors[-2].connectedItem.center() |
|
1397 |
dx, dy = end[-1] - start[0], end[1] - start[1] |
|
1398 |
""" |
|
1399 |
|
|
1391 | 1400 |
self.scene().contents_changed.emit() |
1392 | 1401 |
return value |
1393 | 1402 |
|
1394 | 1403 |
return super().itemChange(change, value) |
1395 | 1404 |
|
1396 |
def removeSelfAttr(self, attributeName): |
|
1397 |
target = None |
|
1398 |
for attr in self.attrs: |
|
1399 |
if attr.Attribute == attributeName: |
|
1400 |
target = attr |
|
1401 |
break |
|
1402 |
|
|
1403 |
if target: |
|
1404 |
del self.attrs[attr] |
|
1405 |
|
|
1406 | 1405 |
''' |
1407 | 1406 |
@brief Check Overlap |
1408 | 1407 |
@author kyouho |
내보내기 Unified diff