프로젝트

일반

사용자정보

개정판 f0fe1a92

IDf0fe1a9213e03e32b0fcbfe100268042520a1c6e
상위 cf7f2a73
하위 5f53ed4b

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

cad spec fix

Change-Id: I7091f11b8d6ed7f97162b40ba27e249c0ad20354

차이점 보기:

DTI_PID/DTI_PID/MainWindow.py
993 993
                        downItem = conn.connectedItem
994 994

  
995 995
                if upItem and downItem:
996
                    attrs = spec_break.getAttributes()
997 996
                    for key in attrs.keys():
998 997
                        if key.Attribute == 'UpStream':
999 998
                            attrs[key] = str(upItem)
......
1061 1060
                                    attribute_table_item[1].remove(downText)
1062 1061
                                    break
1063 1062

  
1064
                    stream_line = [upItem, downItem]
1065
                    stream_track = [downItem, upItem]
1066
                    stream_res = [False, False]
1067
                    for index in range(len(stream_line)):
1068
                        while True:
1069
                            if type(stream_line[index]) is QEngineeringLineItem:
1070
                                stream_res[index] = True
1071
                                break
1072
                            else:
1073
                                find_next = False
1074
                                connected_count = 0
1075
                                for connectorr in stream_line[index].connectors:
1076
                                    connected_count += 1
1077
                                    if connectorr.connectedItem and stream_track[index] is not connectorr.connectedItem and \
1078
                                            stream_line[index].next_connected(stream_track[index], connectorr.connectedItem):
1079
                                        stream_track[index] = stream_line[index]
1080
                                        stream_line[index] = connectorr.connectedItem
1081
                                        find_next = True
1063
                            stream_line = [upItem, downItem]
1064
                            stream_track = [downItem, upItem]
1065
                            stream_res = [False, False]
1066
                            for index in range(len(stream_line)):
1067
                                while True:
1068
                                    if type(stream_line[index]) is QEngineeringLineItem:
1069
                                        stream_res[index] = True
1082 1070
                                        break
1083

  
1084
                                if not find_next:
1085
                                    # prevent infinite loop
1086
                                    if connected_count == 2:
1071
                                    else:
1072
                                        find_next = False
1073
                                        connected_count = 0
1087 1074
                                        for connectorr in stream_line[index].connectors:
1088
                                            if connectorr.connectedItem and not connectorr.connectedItem is stream_track[index]:
1089
                                                stream_line[index] = connectorr.connectedItem
1075
                                            connected_count += 1
1076
                                            if connectorr.connectedItem and stream_track[index] is not connectorr.connectedItem and \
1077
                                                    stream_line[index].next_connected(stream_track[index], connectorr.connectedItem):
1090 1078
                                                stream_track[index] = stream_line[index]
1079
                                                stream_line[index] = connectorr.connectedItem
1091 1080
                                                find_next = True
1092 1081
                                                break
1082

  
1093 1083
                                        if not find_next:
1094
                                            break
1095
                                    else:
1096
                                        break
1084
                                            # prevent infinite loop
1085
                                            if connected_count == 2:
1086
                                                for connectorr in stream_line[index].connectors:
1087
                                                    if connectorr.connectedItem and not connectorr.connectedItem is stream_track[index]:
1088
                                                        stream_line[index] = connectorr.connectedItem
1089
                                                        stream_track[index] = stream_line[index]
1090
                                                        find_next = True
1091
                                                        break
1092
                                                if not find_next:
1093
                                                    break
1094
                                            else:
1095
                                                break
1097 1096

  
1098
                    if stream_res[0] and stream_res[1]:
1099
                        up_down_find = [upText, downText]
1100

  
1101
                        for index in range(len(stream_line)):
1102
                            attrs = stream_line[index].getAttributes()
1103
                            for key in attrs.keys():
1104
                                if key.Attribute == attribute_table_item[0]:
1105
                                    attrs[key] = up_down_find[index].text()
1106
                                    key.AssocItem = up_down_find[index]
1107
                                    stream_line[index].add_assoc_item(up_down_find[index],
1108
                                                                        key.AttrAt, force=True)
1109
                                    up_down_find[index].owner = stream_line[index]
1110
                                    key.Freeze = True
1111
                                    break
1097
                            if stream_res[0] and stream_res[1]:
1098
                                up_down_find = [upText, downText]
1099

  
1100
                                for index in range(len(stream_line)):
1101
                                    _attrs = stream_line[index].getAttributes()
1102
                                    for key in _attrs.keys():
1103
                                        if key.Attribute == attribute_table_item[0]:
1104
                                            _attrs[key] = up_down_find[index].text()
1105
                                            key.AssocItem = up_down_find[index]
1106
                                            stream_line[index].add_assoc_item(up_down_find[index],
1107
                                                                                key.AttrAt, force=True)
1108
                                            up_down_find[index].owner = stream_line[index]
1109
                                            #key.Freeze = True
1110
                                            break
1112 1111
            # up to here
1113 1112

  
1114 1113
        QMessageBox.information(self, self.tr('Information'), self.tr('Connecting between symbols and lines is complete'))

내보내기 Unified diff

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