개정판 fe5e4b3c
test
Change-Id: Ifbe1d3dbc525bfa28696aba9c34e15bc536ee8ea
DTI_PID/DTI_PID/OPCRelationDialog.py | ||
---|---|---|
85 | 85 |
item.setFlags(Qt.ItemIsEnabled) |
86 | 86 |
self.ui.tableWidgetSource.setItem(row, 3, item) |
87 | 87 |
|
88 |
matches = [relation for relation in self._opc_relations if relation['From_OPC_UID'] == opc['OPC']] |
|
88 |
#matches = [relation for relation in self._opc_relations if relation['From_OPC_UID'] == opc['OPC']] |
|
89 |
matches = [] |
|
90 |
for relation in self._opc_relations: |
|
91 |
if relation['From_OPC_UID'] == opc['OPC']: |
|
92 |
matches = [relation] |
|
93 |
break |
|
89 | 94 |
if matches and matches[0]['To_OPC_UID'] in opc_uids: |
90 | 95 |
item = QTableWidgetItem(matches[0]['To_Drawing']) |
91 | 96 |
item.setFlags(Qt.ItemIsEnabled) |
DTI_PID/DTI_PID/Shapes/EngineeringLineItem.py | ||
---|---|---|
138 | 138 |
import uuid |
139 | 139 |
|
140 | 140 |
if self._owner and type(self._owner) is uuid.UUID: |
141 |
matches = [x for x in self.scene().items() if hasattr(x, 'uid') and str(x.uid) == str(self._owner)] |
|
142 |
if matches: self._owner = matches[0] |
|
141 |
#matches = [x for x in self.scene().items() if hasattr(x, 'uid') and str(x.uid) == str(self._owner)] |
|
142 |
matches = [] |
|
143 |
for x in self.scene().items(): |
|
144 |
if hasattr(x, 'uid') and str(x.uid) == str(self._owner): |
|
145 |
matches[x] |
|
146 |
break |
|
147 |
if matches: |
|
148 |
self._owner = matches[0] |
|
143 | 149 |
|
144 | 150 |
if type(self._owner) is not uuid.UUID and type(self._owner) is not str: |
145 | 151 |
return self._owner |
DTI_PID/DTI_PID/Shapes/EngineeringTextItem.py | ||
---|---|---|
96 | 96 |
|
97 | 97 |
# find owner with uid |
98 | 98 |
if self.scene() and self._owner is not None and type(self._owner) is uuid.UUID: |
99 |
matches = [x for x in self.scene().items() if hasattr(x, 'uid') and str(x.uid) == str(self._owner)] |
|
100 |
if matches: self._owner = matches[0] |
|
99 |
#matches = [x for x in self.scene().items() if hasattr(x, 'uid') and str(x.uid) == str(self._owner)] |
|
100 |
matches = [] |
|
101 |
for x in self.scene().items(): |
|
102 |
if hasattr(x, 'uid') and str(x.uid) == str(self._owner): |
|
103 |
matches = [x] |
|
104 |
break |
|
105 |
if matches: |
|
106 |
self._owner = matches[0] |
|
107 |
|
|
101 | 108 |
return matches[0] if matches else None |
102 | 109 |
# up to here |
103 | 110 |
|
DTI_PID/DTI_PID/Shapes/SymbolSvgItem.py | ||
---|---|---|
155 | 155 |
import uuid |
156 | 156 |
|
157 | 157 |
if self._owner and type(self._owner) is uuid.UUID: |
158 |
matches = [x for x in self.scene().items() if hasattr(x, 'uid') and str(x.uid) == str(self._owner)] |
|
158 |
#matches = [x for x in self.scene().items() if hasattr(x, 'uid') and str(x.uid) == str(self._owner)] |
|
159 |
matches = [] |
|
160 |
for x in self.scene().items(): |
|
161 |
if hasattr(x, 'uid') and str(x.uid) == str(self._owner): |
|
162 |
matches = [x] |
|
163 |
break |
|
159 | 164 |
if matches: |
160 | 165 |
self._owner = matches[0] |
161 | 166 |
|
내보내기 Unified diff