프로젝트

일반

사용자정보

개정판 992406b9

ID992406b9062082a1495a54eb4d2b950be39b5477
상위 6c036170
하위 3725ba37

함의성이(가) 일년 이상 전에 추가함

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

클립보드 이미지 추가 (최대 크기: 500 MB)