개정판 af2b9605
issue #000 fix LineNoTracer and search text
Change-Id: Iedc2ee6342a231219ee85e92efaab71d8710dae7
DTI_PID/DTI_PID/LineNoTracer.py | ||
---|---|---|
71 | 71 |
elif (not _from or not _to) and (1 == len(lineno.conns)): |
72 | 72 |
connected_items = self.find_connected_objects(lineno.conns[0]) |
73 | 73 |
|
74 |
#print(connected_items) |
|
74 | 75 |
if connected_items: |
75 | 76 |
for item in connected_items: |
76 | 77 |
item.owner = lineno # set item's owner |
... | ... | |
84 | 85 |
lineno.set_property('From', connected_items[0]) |
85 | 86 |
lineno.set_property('To', connected_items[-1]) |
86 | 87 |
|
87 |
if _to is not None and (not connected_items or connected_items[-1] is not _to):
|
|
88 |
if _to is not None and connected_items and connected_items[-1] is not _to:
|
|
88 | 89 |
_to.owner = None |
89 | 90 |
|
90 | 91 |
return connected_items |
... | ... | |
159 | 160 |
for lineno in self._lineNos: |
160 | 161 |
_from = lineno.prop('From') |
161 | 162 |
_to = lineno.prop('To') |
162 |
if _from and _to and (type(_from) is QEngineeringLineItem or issubclass(type(_from), SymbolSvgItem)) and (type(_to) is QEngineeringLineItem or issubclass(type(_to), SymbolSvgItem)) : |
|
163 |
#if type(_from) is str or type(_to) is str: |
|
164 |
# print(str(lineno.uid)) |
|
165 |
if _from and _to and (type(_from) is QEngineeringLineItem or issubclass(type(_from), SymbolSvgItem)) and (type(_to) is QEngineeringLineItem or issubclass(type(_to), SymbolSvgItem)): |
|
163 | 166 |
_from.owner = lineno |
164 | 167 |
_to.owner = lineno |
165 | 168 |
continue |
DTI_PID/DTI_PID/Shapes/EngineeringAbstractItem.py | ||
---|---|---|
173 | 173 |
self._associations[_type].append(item) |
174 | 174 |
else: |
175 | 175 |
while len(self._associations[_type]) <= at: self._associations[_type].append(None) |
176 |
self._associations[_type][at] = item |
|
176 |
self._associations[_type][at] = item |
|
177 |
|
|
178 |
def remove_assoc_item(self, item): |
|
179 |
""" remove given item from association """ |
|
180 |
pass |
DTI_PID/DTI_PID/TextItemEditDialog.py | ||
---|---|---|
73 | 73 |
if not text: return |
74 | 74 |
|
75 | 75 |
if int(self.ui.checkBoxUID.checkState()) is int(Qt.Checked): |
76 |
self.textItems = [item for item in self.mainWindow.graphicsView.scene.items() if (issubclass(type(item), SymbolSvgItem) or type(item) is QEngineeringLineItem) and str(item.uid).count(text)]
|
|
76 |
self.textItems = [item for item in self.mainWindow.graphicsView.scene.items() if hasattr(item, 'uid') and str(item.uid).count(text)]
|
|
77 | 77 |
else: |
78 | 78 |
self.textItems = [item for item in self.mainWindow.graphicsView.scene.items() if issubclass(type(item), QEngineeringTextItem) and item.text().count(text)] |
79 |
|
|
79 |
|
|
80 |
if not self.textItems: |
|
81 |
QMessageBox.about(self, self.tr("Notice"), self.tr('Nothing Found.')) |
|
82 |
return |
|
80 | 83 |
if self.prevText != text: |
81 | 84 |
self.prevText = text |
82 | 85 |
self.listIndex = 0 |
내보내기 Unified diff