개정판 d99751fd
issue #000: multi connected symbol now consider symbol connected directly when make run
Change-Id: Id68558ca84de50a2e10183f6c1963cb8ab348af6
DTI_PID/DTI_PID/Commands/SelectAttributeCommand.py | ||
---|---|---|
69 | 69 |
self.onSuccess.emit() |
70 | 70 |
elif item is not None and self._attr.AttributeType == 'CONN' and (issubclass(type(item), QEngineeringLineItem) or issubclass(type(item), SymbolSvgItem) or type(item) is QEngineeringVendorItem or type(item) is QEngineeringReservedWordTextItem): |
71 | 71 |
self._item.connectors[self._attr.AttrAt - 1].connect(item, QEngineeringAbstractItem.CONNECTED_AT_BODY) |
72 |
if type(item) is QEngineeringReservedWordTextItem: |
|
73 |
item.owner = self._item |
|
72 | 74 |
self.onSuccess.emit() |
73 | 75 |
elif item is not None and self._attr.AttributeType == 'CONN' and (type(item) is QEngineeringConnectorItem): |
74 | 76 |
self._item.connectors[self._attr.AttrAt - 1].connect(item.parent, QEngineeringAbstractItem.CONNECTED_AT_PT) |
DTI_PID/DTI_PID/LineNoTracer.py | ||
---|---|---|
277 | 277 |
#print('connected ' + matchLineNo.text() + ' and ' + matchLine.uid) |
278 | 278 |
## up to here |
279 | 279 |
""" |
280 |
|
|
280 |
|
|
281 | 281 |
maxValue = len(self._lineNos) + 1 ## line no's count + secondary line |
282 | 282 |
|
283 | 283 |
# find primary lines |
... | ... | |
366 | 366 |
|
367 | 367 |
elif issubclass(type(obj), SymbolSvgItem): |
368 | 368 |
lineMatches = [x for x in self._lines if (x.owner is None or x.owner == start.owner) and (x not in visited) and obj.is_connected(x)] |
369 |
if len(lineMatches) > 1: # choose one if connected lines are more than 2 |
|
369 |
symbolMatches = [x for x in self._symbols if (x.owner is None or x.owner == start.owner) and (x is not obj) and (x not in visited) and obj.is_connected(x, None)] |
|
370 |
|
|
371 |
if len(lineMatches + symbolMatches) > 1: # choose one if connected lines are more than 2 |
|
370 | 372 |
matches = [x for x in visited if obj.is_connected(x)] |
371 | 373 |
if matches: |
372 | 374 |
#print(matches[0]) |
373 |
next_connected = [x for x in lineMatches if obj.next_connected(x, matches[0])] |
|
375 |
next_connected = [x for x in lineMatches + symbolMatches if obj.next_connected(x, matches[0])]
|
|
374 | 376 |
#print(next_connected) |
375 | 377 |
if next_connected: |
376 | 378 |
lineMatches = next_connected |
377 | 379 |
else: |
378 | 380 |
lineMatches = [lineMatches[0]] |
379 | 381 |
|
380 |
symbolMatches = [x for x in self._symbols if (x.owner is None or x.owner == start.owner) and (x is not obj) and (x not in visited) and obj.is_connected(x, None)] |
|
381 | 382 |
#print(visited) |
382 | 383 |
#for s in self._symbols: |
383 | 384 |
# print(s) |
내보내기 Unified diff