개정판 b31800e5
validate
Change-Id: I664bd489a450d9f996fcd0bf99667ee727558e21
DTI_PID/DTI_PID/Commands/HighlightCommand.py | ||
---|---|---|
119 | 119 |
elif type(param) is QEngineeringErrorItem: |
120 | 120 |
rect = param.sceneBoundingRect() |
121 | 121 |
rect.united(param.parent.sceneBoundingRect()) |
122 |
|
|
123 |
for item in param.items: |
|
124 |
rect.united(item.sceneBoundingRect()) |
|
125 |
|
|
122 | 126 |
self.imageViewer.centerOn(rect.center()) |
123 | 127 |
|
124 | 128 |
rect.translate(-FIT_WINDOW_SIZE, -FIT_WINDOW_SIZE) |
... | ... | |
129 | 133 |
self.imageViewer.scene().clearSelection() |
130 | 134 |
self.imageViewer.updateViewer(QRectF(topLeft.x(), topLeft.y(), bottomRight.x() - topLeft.x(), |
131 | 135 |
bottomRight.y() - topLeft.y())) |
132 |
param.parent.setSelected(True) |
|
133 | 136 |
param.setSelected(True) |
134 | 137 |
param.update() |
138 |
param.parent.setSelected(True) |
|
139 |
param.parent.update() |
|
140 |
for item in param.items: |
|
141 |
item.setSelected(True) |
|
142 |
item.update() |
|
135 | 143 |
else: |
136 | 144 |
rect = param.sceneBoundingRect() |
137 | 145 |
self.imageViewer.centerOn(rect.center()) |
DTI_PID/DTI_PID/Shapes/EngineeringErrorItem.py | ||
---|---|---|
28 | 28 |
SymbolSvgItem.__init__(self, None, path, uid, flip=flip) |
29 | 29 |
self.setZValue(QEngineeringErrorItem.ZVALUE) |
30 | 30 |
self.msg = None |
31 |
self.items = [] |
|
31 | 32 |
|
32 | 33 |
def setPosition(self, loc): |
33 | 34 |
rect = self.boundingRect() |
DTI_PID/DTI_PID/Shapes/SymbolSvgItem.py | ||
---|---|---|
313 | 313 |
error.setToolTip(error.msg) |
314 | 314 |
error.area = self.area |
315 | 315 |
error.name = 'Error' |
316 |
error.items = labels |
|
316 | 317 |
errors.append(error) |
317 | 318 |
|
318 | 319 |
# check overlapping |
... | ... | |
328 | 329 |
error.setToolTip(error.msg) |
329 | 330 |
error.area = self.area |
330 | 331 |
error.name = 'Error' |
332 |
error.items = [ symbol ] |
|
331 | 333 |
errors.append(error) |
332 | 334 |
|
333 | 335 |
# set error position |
... | ... | |
353 | 355 |
error.setToolTip(error.msg) |
354 | 356 |
error.area = self.area |
355 | 357 |
error.name = 'Error' |
358 |
error.items = [ connector.connectedItem ] |
|
356 | 359 |
errors.append(error) |
357 | 360 |
|
358 | 361 |
# check duplicated connection |
내보내기 Unified diff