프로젝트

일반

사용자정보

개정판 25bc4adc

ID25bc4adc897f5eff2897b03433f0e52c290c9bb1
상위 58581b70
하위 b74a9855, e32a146a

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

issue #000: fix note

Change-Id: Ibce8dfe7b3373808b6484df85ccb781527e13807

차이점 보기:

DTI_PID/DTI_PID/LineNoTracer.py
377 377
    from EngineeringValveOperCodeTextItem import QEngineeringValveOperCodeTextItem
378 378
    from QEngineeringTrimLineNoTextItem import QEngineeringTrimLineNoTextItem
379 379
    from QEngineeringTagNoTextItem import QEngineeringTagNoTextItem
380
    from EngineeringNoteItem import QEngineeringNoteItem
381 380

  
382 381
    try:
383 382
        worker.displayMessage.emit('Initiating...')
......
389 388
        lineIndicator = []
390 389
        vendor_packages = [item for item in worker.graphicsView.scene.items() if type(item) is QEngineeringVendorItem]
391 390
        end_breaks = []
391
        notes = []
392 392
        #flow_marks = []
393 393

  
394 394
        for end_break in [item for item in worker.graphicsView.scene.items() if type(item) is QEngineeringEndBreakItem]:
......
410 410
        for item in worker.graphicsView.scene.items():
411 411
            if type(item) is QEngineeringSpecBreakItem:
412 412
                specBreak.append(item)
413
            elif issubclass(type(item), SymbolSvgItem) and not type(item) is QEngineeringUnknownItem and not type(QEngineeringNoteItem):
413
            elif issubclass(type(item), SymbolSvgItem) and not (type(item) is QEngineeringUnknownItem) and item.type != 'Notes':
414 414
                matches = [vendor_package for vendor_package in vendor_packages if vendor_package.includes(item)]
415 415
                if matches:
416 416
                    item.set_property('Supplied By', vendorTag)
......
427 427
                lineIndicator.append(item)
428 428
            elif issubclass(type(item), QEngineeringTextItem):
429 429
                item.owner = None
430
            elif item.type == 'Notes':
431
                notes.append(item)
430 432

  
431 433
        # remove unknown line's
432 434
        pastTrim = docdata.tracerLineNos
......
473 475
                if assoc.owner is None:
474 476
                    assoc.owner = symbol
475 477

  
478
        """ restore note text item onwer """
479
        for note in notes:
480
            for noteText in note.associations():
481
                noteText.owner = note
482

  
476 483
        """ try to find text item's owner """
477 484
        texts = [item for item in worker.graphicsView.scene.items() if type(item) is QEngineeringReservedWordTextItem]
478 485
        for text in texts:
DTI_PID/DTI_PID/TextItemFactory.py
279 279
                        if symbol.name in symbol_names and symbol.includes(textInfo.center):
280 280
                            item = QEngineeringNoteItem(symbol=symbol)
281 281
                            symbol.add_assoc_item(item)
282
                            item.owner = symbol
282 283
                            break
283 284
                else:
284 285
                    item = QEngineeringNoteItem()

내보내기 Unified diff

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