개정판 121ada14
line no highlight change
Change-Id: Iad03439cb5cb391a0e3c32ca7b5ebe77fa413772
DTI_PID/DTI_PID/Commands/HighlightCommand.py | ||
---|---|---|
89 | 89 |
else: |
90 | 90 |
item.setSelected(True) |
91 | 91 |
item.update() |
92 |
elif type(param) is QEngineeringLineNoTextItem: |
|
93 |
rect = None |
|
94 |
for run in param.runs: |
|
95 |
for item in run.items: |
|
96 |
rect = item.sceneBoundingRect() if rect is None else rect.united(item.sceneBoundingRect()) |
|
97 |
|
|
98 |
if rect is None: |
|
99 |
rect = param.sceneBoundingRect() |
|
100 |
|
|
101 |
self.imageViewer.centerOn(rect.center()) |
|
102 |
|
|
103 |
rect.translate(-FIT_WINDOW_SIZE, -FIT_WINDOW_SIZE) |
|
104 |
rect.setWidth(rect.width() + FIT_WINDOW_SIZE * 2) |
|
105 |
rect.setHeight(rect.height() + FIT_WINDOW_SIZE * 2) |
|
106 |
topLeft = rect.topLeft() |
|
107 |
bottomRight = rect.bottomRight() |
|
108 |
self.imageViewer.scene().clearSelection() |
|
109 |
self.imageViewer.updateViewer(QRectF(topLeft.x(), topLeft.y(), bottomRight.x() - topLeft.x(), |
|
110 |
bottomRight.y() - topLeft.y())) |
|
111 |
for run in param.runs: |
|
112 |
for item in run.items: |
|
113 |
item.setSelected(True) |
|
114 |
item.update() |
|
115 |
|
|
116 |
param.setSelected(True) |
|
117 |
param.update() |
|
92 | 118 |
else: |
93 | 119 |
rect = param.sceneBoundingRect() |
94 | 120 |
self.imageViewer.centerOn(rect.center()) |
... | ... | |
101 | 127 |
self.imageViewer.scene().clearSelection() |
102 | 128 |
self.imageViewer.updateViewer(QRectF(topLeft.x(), topLeft.y(), bottomRight.x() - topLeft.x(), |
103 | 129 |
bottomRight.y() - topLeft.y())) |
104 |
|
|
105 |
if type(param) is QEngineeringLineNoTextItem: |
|
106 |
for run in param.runs: |
|
107 |
for item in run.items: |
|
108 |
item.setSelected(True) |
|
109 |
item.update() |
|
110 |
|
|
111 | 130 |
param.setSelected(True) |
112 | 131 |
param.update() |
113 | 132 |
|
내보내기 Unified diff