프로젝트

일반

사용자정보

개정판 8c6ea5a3

ID8c6ea5a3ec4f355f9100bbca901ef234e52911a9
상위 d4beff71
하위 9a202857

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

issue #481: add validation check for symbol connection and line type

Change-Id: I7e0d1095ddc784b2d67cf2584a1d29478a54b82e

차이점 보기:

DTI_PID/DTI_PID/Shapes/SymbolSvgItem.py
395 395
                error.area = self.area
396 396
                error.name = 'Error'
397 397
                errors.append(error)
398

  
399
            # check line type
400
            if self.conn_type:
401
                for index in range(len(self.conn_type)):
402
                    item = self.connectors[index].connectedItem
403
                    if item and type(item) is QEngineeringLineItem:
404
                        if ((self.conn_type[index] == 'Primary' or self.conn_type[index] == 'Secondary') and not item.is_piping()) or \
405
                                (not (self.conn_type[index] == 'Primary' or self.conn_type[index] == 'Secondary') and item.is_piping(True)):
406
                            error = SymbolSvgItem.createItem('Error', None, dataPath)
407
                            error.setPosition(self.connectors[index].center())
408
                            error.parent = self
409
                            error.msg = self.tr('line type error')
410
                            error.setToolTip(error.msg)
411
                            error.area = self.area
412
                            error.name = 'Error'
413
                            errors.append(error)
414
                            
398 415
        except Exception as ex:
399 416
            from App import App
400 417
            message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename,

내보내기 Unified diff

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