개정판 08aba7a5
incon highlight
Change-Id: I1dfa289fe6e28ee7e676826d3808e65722ee222b
DTI_PID/DTI_PID/Commands/HighlightCommand.py | ||
---|---|---|
31 | 31 |
from SymbolSvgItem import SymbolSvgItem |
32 | 32 |
from EngineeringNoteItem import QEngineeringNoteItem |
33 | 33 |
from EngineeringLineNoTextItem import QEngineeringLineNoTextItem |
34 |
from EngineeringErrorItem import QEngineeringErrorItem |
|
34 | 35 |
|
35 | 36 |
self.isTreated = False |
36 | 37 |
FIT_WINDOW_SIZE = 500 |
... | ... | |
115 | 116 |
|
116 | 117 |
param.setSelected(True) |
117 | 118 |
param.update() |
119 |
elif type(param) is QEngineeringErrorItem: |
|
120 |
rect = param.sceneBoundingRect() |
|
121 |
rect.united(param.parent.sceneBoundingRect()) |
|
122 |
self.imageViewer.centerOn(rect.center()) |
|
123 |
|
|
124 |
rect.translate(-FIT_WINDOW_SIZE, -FIT_WINDOW_SIZE) |
|
125 |
rect.setWidth(rect.width() + FIT_WINDOW_SIZE*2) |
|
126 |
rect.setHeight(rect.height() + FIT_WINDOW_SIZE*2) |
|
127 |
topLeft = rect.topLeft() |
|
128 |
bottomRight = rect.bottomRight() |
|
129 |
self.imageViewer.scene().clearSelection() |
|
130 |
self.imageViewer.updateViewer(QRectF(topLeft.x(), topLeft.y(), bottomRight.x() - topLeft.x(), |
|
131 |
bottomRight.y() - topLeft.y())) |
|
132 |
param.parent.setSelected(True) |
|
133 |
param.setSelected(True) |
|
134 |
param.update() |
|
118 | 135 |
else: |
119 | 136 |
rect = param.sceneBoundingRect() |
120 | 137 |
self.imageViewer.centerOn(rect.center()) |
내보내기 Unified diff