개정판 546b8a4f
fix size
Change-Id: Ifd5ef50c89df80e742a90e93f3afacd3329bcaab
DTI_PID/DTI_PID/Shapes/EngineeringAbstractItem.py | ||
---|---|---|
435 | 435 |
visited.append(match) |
436 | 436 |
# up to here |
437 | 437 |
|
438 |
if len(visited) > 1: |
|
439 |
fixed = False |
|
440 |
for index in range(len(visited) - 1): |
|
441 |
if issubclass(type(visited[index]), QEngineeringLineItem) and (not visited[index].connectors[1].connectedItem or visited[index].connectors[1].connectedItem is not visited[index + 1]): |
|
442 |
visited.reverse() |
|
443 |
fixed = True |
|
444 |
break |
|
445 |
|
|
446 |
if not fixed: |
|
447 |
for index in range(len(visited)): |
|
448 |
if index == 0: |
|
449 |
continue |
|
450 |
|
|
451 |
if issubclass(type(visited[index]), QEngineeringLineItem) and (not visited[index].connectors[0].connectedItem or visited[index].connectors[0].connectedItem is not visited[index - 1]): |
|
452 |
visited.reverse() |
|
453 |
fixed = True |
|
454 |
break |
|
455 |
|
|
456 |
# need check pipe run order later |
|
457 |
#if not fixed: |
|
458 |
|
|
459 |
|
|
438 | 460 |
except Exception as ex: |
439 | 461 |
from App import App |
440 | 462 |
from AppDocData import MessageType |
... | ... | |
498 | 520 |
return item.Size |
499 | 521 |
prev = item |
500 | 522 |
|
501 |
downstream = matches[0].items[at:] |
|
523 |
downstream = matches[0].items[at + 1:]
|
|
502 | 524 |
prev = self |
503 | 525 |
for item in downstream: |
504 | 526 |
if type(item) is QEngineeringReducerItem: |
... | ... | |
551 | 573 |
return item.Size |
552 | 574 |
prev = item |
553 | 575 |
|
554 |
downstream = connected_items[at:] |
|
576 |
downstream = connected_items[at + 1:]
|
|
555 | 577 |
prev = self |
556 | 578 |
for item in downstream: |
557 | 579 |
if type(item) is QEngineeringReducerItem: |
내보내기 Unified diff