개정판 4fc8fbcc
dev issue #637: edit bug
DTI_PID/DTI_PID/Commands/DefaultCommand.py | ||
---|---|---|
108 | 108 |
if 'mouseReleaseEvent' == param[0] and event.button() == Qt.LeftButton: |
109 | 109 |
from EngineeringConnectorItem import QEngineeringConnectorItem |
110 | 110 |
|
111 |
item = self.imageViewer.scene.itemAt(scenePos, QTransform()) |
|
112 |
if item is not None and type(item) is QEngineeringConnectorItem: |
|
113 |
scenePos = QPointF(item.center()[0], item.center()[1]) |
|
114 |
|
|
115 |
#self.tempAngle = self.symbol.angle |
|
116 |
#self.symbol.angle = 0 |
|
117 |
|
|
118 | 111 |
offsetX = 0 |
119 | 112 |
offsetY = 0 |
120 | 113 |
transform = QTransform() |
... | ... | |
122 | 115 |
if 0 == self.symbol.angle or 3.14 == self.symbol.angle: |
123 | 116 |
transform.translate(self.specBreak_startPoint[0], scenePos.y()) |
124 | 117 |
offsetY = self.specBreak_startPoint[1] - scenePos.y() |
125 |
#offsetY = self.specBreak_startPoint[0] - scenePos.x() |
|
126 | 118 |
|
127 | 119 |
else: |
128 | 120 |
transform.translate(scenePos.x(), self.specBreak_startPoint[1]) |
... | ... | |
150 | 142 |
elif 'mouseMoveEvent' == param[0]: |
151 | 143 |
from EngineeringConnectorItem import QEngineeringConnectorItem |
152 | 144 |
|
153 |
item = self.imageViewer.scene.itemAt(scenePos, QTransform()) |
|
154 |
if item is not None and type(item) is QEngineeringConnectorItem: |
|
155 |
scenePos = QPointF(item.center()[0], item.center()[1]) |
|
156 |
|
|
157 | 145 |
transform = QTransform() |
158 | 146 |
currentPt = self.symbol.getCurrentPoint() |
159 | 147 |
if 0 == self.symbol.angle or 3.14 == self.symbol.angle: |
내보내기 Unified diff