프로젝트

일반

사용자정보

개정판 1ede48b4

ID1ede48b4dc83f76bd6d4490b923e8ad61b744427
상위 e8dd8128
하위 93202f88

함의성이(가) 약 4년 전에 추가함

issue #000: line list preview case 1 fix

Change-Id: I3cf0ee17c3137514ece0a05b709ee95ee4b2dffd

차이점 보기:

DTI_PID/DTI_PID/LineListDialog.py
73 73

  
74 74
        app_doc_data = AppDocData.instance()
75 75

  
76
        self.lineColumnListAll = ['HIDE', 'FROM', 'TO', 'P&ID NO.', 'PHASE', 'Stream No']
76
        self.lineColumnListAll = ['HIDE', 'FROM', 'TO', 'P&ID NO.', 'Stream No']
77 77
        #['SIZE', 'FLUID CODE', 'NO.', "MAT'L SPEC.", 'FROM', 'TO', 'P&ID NO.', 'PHASE', 'Stream No', 'INSULATION CODE', 'THK.']
78 78
        self.lineColumnListAll.extend([prop.Attribute for prop in app_doc_data.getLineProperties()])
79 79
        hmb_datas = app_doc_data.get_hmb_data(None)
80 80
        names = []
81 81
        if hmb_datas:
82
            for data in hmb_datas[0].data:
82
            for data in hmb_datas[0].datas[0]:
83 83
                if data.name not in names:
84 84
                    names.append(data.name)
85 85
            self.lineColumnListAll.extend(names)
......
339 339
                    if matches:
340 340
                        hmb_data = matches[0]
341 341

  
342
                    phase = ''
343
                    if hmb_data:
344
                        phase = hmb_data.phase
345

  
346 342
                    line_no = row_data[0].owner
347 343
                    from_ = self.get_from_name(row_data)
348 344
                    to_ = self.get_to_name(row_data)
......
359 355
                    data['FROM'] = from_item
360 356
                    data['TO'] = to_item
361 357
                    data['P&ID NO.'] = pnid_no
362
                    data['PHASE'] = phase
363 358
                    data['Stream No'] = stream_no
364 359

  
365 360
                    items = []
......
378 373
                            continue
379 374

  
380 375
                        datas = []
381
                        if phase == 'Two':
382
                            phase = 'LIQUID'
383
                        elif not phase:
384
                            items.append(QStandardItem('-'))
385
                            model_data[name] = '-'
386
                            continue
387

  
388 376
                        if hmb_data:
389
                            datas = hmb_data.data
377
                            datas = hmb_data.datas[0]
378
                            matches = [data for data in datas if data.name == name]
379
                            if matches:
380
                                value = matches[0].value
381
                                items.append(QStandardItem(value)) if type(value) is str else items.append(value)
382
                                model_data[name] = value if type(value) is str else value.text()
390 383

  
384
                            '''
391 385
                            matches = [data for data in datas if data.name == name and data.phase == phase]
392 386
                            if matches:
393 387
                                value = matches[0].value
......
402 396
                                else:
403 397
                                    items.append(QStandardItem('')) if type(value) is str else items.append(value)
404 398
                                    model_data[name] = value if type(value) is str else value.text()
399
                            '''
405 400

  
406 401
                    model.appendRow(items)
407 402
                    model_datas.append(model_data)
408 403
            else:
404
                pass
405
                '''
409 406
                model_datas = copy.deepcopy(app_doc_data._streamLineListModelDatas)
410 407

  
411 408
                for model_data in model_datas:
......
478 475
                                    model_data[name] = value if type(value) is str else value.text()
479 476

  
480 477
                    model.appendRow(items)
478
                '''
481 479

  
482 480
            model.setHorizontalHeaderLabels([header[1] for header in headers])
483 481

  
DTI_PID/DTI_PID/MainWindow.py
1530 1530
                DisplayColors.instance().option = DisplayOptions.DisplayByLineNo
1531 1531
            elif self.sender() is visualization_pane.ui.radioButtonByType and value is True:
1532 1532
                DisplayColors.instance().option = DisplayOptions.DisplayByLineType
1533
            elif self.sender() is visualization_pane.ui.radioButtonByStreamNo is True:
1533
            elif self.sender() is visualization_pane.ui.radioButtonByStreamNo and value is True:
1534 1534
                DisplayColors.instance().option = DisplayOptions.DisplayByStreamNo
1535 1535

  
1536 1536
            if hasattr(self, 'graphicsView') and value is True:
DTI_PID/DTI_PID/Shapes/EngineeringAbstractItem.py
622 622
            if hmb_datas and hmb_attrs and matches and _attrs[matches[0]] and _attrs[matches[0]] != 'None':
623 623
                stream_no = _attrs[matches[0]]
624 624
                names = []
625
                for data in hmb_datas[0].data:
625
                for data in hmb_datas[0].datas[0]:
626 626
                    if data.name not in names:
627 627
                        names.append(data.name)
628 628

  

내보내기 Unified diff

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