개정판 c2012f5f
issue #578: add reverse flow action
Change-Id: I441824472a2f61253dd32222f38b95f9caf45394
DTI_PID/DTI_PID/ItemTreeWidget.py | ||
---|---|---|
148 | 148 |
explode_action = QAction(self.tr("Explode")) |
149 | 149 |
explode_action.triggered.connect(lambda : self.explode_line_no(item)) |
150 | 150 |
menu.addAction(explode_action) |
151 |
reverse_flow_action = QAction(self.tr("Reverse Flow")) |
|
152 |
reverse_flow_action.triggered.connect(lambda : self.reverse_line_flow(item)) |
|
153 |
menu.addAction(reverse_flow_action) |
|
151 | 154 |
menu.exec_(self.viewport().mapToGlobal(position)) |
152 | 155 |
elif len(indexes) > 0 and data is not None and issubclass(type(data), QEngineeringRunItem): |
153 | 156 |
index = indexes[0] |
... | ... | |
208 | 211 |
finally: |
209 | 212 |
pass |
210 | 213 |
|
214 |
def reverse_line_flow(self, lineNoTreeWidgetItem): |
|
215 |
""" reverse line flow """ |
|
216 |
|
|
217 |
try: |
|
218 |
line_no_item = lineNoTreeWidgetItem.data(0, self.TREE_DATA_ROLE) |
|
219 |
if line_no_item: |
|
220 |
line_no_item.reverse() |
|
221 |
finally: |
|
222 |
pass |
|
223 |
|
|
211 | 224 |
def explode_line_no(self, lineNoTreeWidgetItem): |
212 | 225 |
""" explode line no """ |
213 | 226 |
|
내보내기 Unified diff