개정판 992406b9
fix line no remove
Change-Id: I79bce7c8541079f1eb828130156d7939ea3acee4
DTI_PID/DTI_PID/MainWindow.py | ||
---|---|---|
3328 | 3328 |
item.scene().removeItem(item) |
3329 | 3329 |
del item |
3330 | 3330 |
else: |
3331 |
if hasattr(item, 'lineNoFromToIndicator') and item.lineNoFromToIndicator: |
|
3332 |
item.scene().removeItem(item.lineNoFromToIndicator[0]) |
|
3333 |
if len(item.lineNoFromToIndicator) > 1: |
|
3334 |
item.scene().removeItem(item.lineNoFromToIndicator[1]) |
|
3335 |
|
|
3336 | 3331 |
remove_scene = item.scene() |
3337 |
self.itemTreeWidget.itemRemoved(item) |
|
3338 | 3332 |
|
3339 | 3333 |
if remove_scene: |
3340 | 3334 |
matches = [_item for _item in remove_scene.items() if |
... | ... | |
3351 | 3345 |
# _item.remove_assoc_item(item) |
3352 | 3346 |
|
3353 | 3347 |
app_doc_data = AppDocData.instance() |
3348 |
if type(item) is QEngineeringLineNoTextItem: |
|
3349 |
self.itemTreeWidget.explode_line_no_from_context(item) |
|
3350 |
|
|
3354 | 3351 |
if type(item) is QEngineeringLineNoTextItem and item in app_doc_data.tracerLineNos: |
3355 | 3352 |
app_doc_data.tracerLineNos.pop(app_doc_data.tracerLineNos.index(item)) |
3356 | 3353 |
|
... | ... | |
3358 | 3355 |
app_doc_data.lines.remove(item) |
3359 | 3356 |
|
3360 | 3357 |
if remove_scene: |
3361 |
matches = [_item for _item in remove_scene.items() if |
|
3362 |
type(_item) is QEngineeringLineNoTextItem] |
|
3358 |
matches = [_item for _item in remove_scene.items() if type(_item) is QEngineeringLineNoTextItem] |
|
3363 | 3359 |
matches.extend([lineNo for lineNo in app_doc_data.tracerLineNos if |
3364 | 3360 |
type(lineNo) is QEngineeringTrimLineNoTextItem]) |
3365 | 3361 |
for match in matches: |
... | ... | |
3401 | 3397 |
break |
3402 | 3398 |
# if done: break |
3403 | 3399 |
|
3404 |
if item.scene() is not None:
|
|
3400 |
if remove_scene:
|
|
3405 | 3401 |
#if type(item) is QEngineeringLineNoTextItem and item._labels: |
3406 | 3402 |
# for _label in item._labels: |
3407 | 3403 |
# item.scene().removeItem(_label) |
3408 | 3404 |
# item._labels = [] |
3409 | 3405 |
|
3410 | 3406 |
item.hoverLeaveEvent(None) |
3411 |
item.scene().removeItem(item) |
|
3407 |
if hasattr(item, 'lineNoFromToIndicator') and item.lineNoFromToIndicator: |
|
3408 |
remove_scene.removeItem(item.lineNoFromToIndicator[0]) |
|
3409 |
if len(item.lineNoFromToIndicator) > 1: |
|
3410 |
remove_scene.removeItem(item.lineNoFromToIndicator[1]) |
|
3411 |
remove_scene.removeItem(item) |
|
3412 |
|
|
3413 |
self.itemTreeWidget.itemRemoved(item) |
|
3412 | 3414 |
except Exception as ex: |
3413 | 3415 |
message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, |
3414 | 3416 |
sys.exc_info()[-1].tb_lineno) |
내보내기 Unified diff