개정판 cfcc7fb4
issue #563: add spec break item freeze funct
Change-Id: Iede78f95688e0d88746597080e3664f14ba39098
DTI_PID/DTI_PID/ItemPropertyTableWidget.py | ||
---|---|---|
621 | 621 |
|
622 | 622 |
self.show_item_attributes(self._item) |
623 | 623 |
self.show_item_connectors(self._item) |
624 |
|
|
625 |
if type(self._item) is QEngineeringSpecBreakItem: |
|
626 |
self.show_item_properties(self._item) |
|
624 | 627 |
|
625 | 628 |
for index in range(self.rowCount()): |
626 | 629 |
item = self.item(index, 3) |
DTI_PID/DTI_PID/LineNoTracer.py | ||
---|---|---|
452 | 452 |
for end_break in [item for item in worker.graphicsView.scene.items() if type(item) is QEngineeringEndBreakItem]: |
453 | 453 |
if not end_break.prop('Freeze'): |
454 | 454 |
end_break.transfer.onRemoved.emit(end_break) |
455 |
#worker.graphicsView.scene.removeItem(end_break) |
|
456 | 455 |
else: |
457 | 456 |
end_breaks.append(end_break) |
458 | 457 |
|
458 |
''' |
|
459 | 459 |
for flow_mark in [item for item in worker.graphicsView.scene.items() if type(item) is QEngineeringFlowMarkItem]: |
460 | 460 |
if not flow_mark.prop('Freeze'): |
461 | 461 |
flow_mark.transfer.onRemoved.emit(flow_mark) |
462 |
#worker.graphicsView.scene.removeItem(end_break) |
|
463 | 462 |
else: |
464 | 463 |
flow_marks.append(flow_mark) |
464 |
''' |
|
465 | 465 |
|
466 | 466 |
configs = docdata.getConfigs('Supplied by Tag Rule', 'by Vendor') |
467 | 467 |
vendorTag = configs[0].value if configs else 'By Vendor' |
... | ... | |
651 | 651 |
|
652 | 652 |
""" update spec break """ |
653 | 653 |
if update_spec: |
654 |
freezed_spec_breaks = [] |
|
654 | 655 |
for spec_break in spec_breaks: |
655 |
spec_break.transfer.onRemoved.emit(spec_break) |
|
656 |
if not spec_break.prop('Freeze'): |
|
657 |
spec_break.transfer.onRemoved.emit(spec_break) |
|
658 |
else: |
|
659 |
freezed_spec_breaks.append(spec_break) |
|
656 | 660 |
|
657 | 661 |
for line in lines: |
658 | 662 |
line.clear_labels() |
... | ... | |
719 | 723 |
|
720 | 724 |
spec_break_items = [] |
721 | 725 |
for spec in spec_breaks: |
726 |
dupl = False |
|
727 |
for freezed in freezed_spec_breaks: |
|
728 |
freezed_attrs = freezed.getAttributes() |
|
729 |
up = [attr.AssocItem for attr in freezed_attrs if attr.Attribute == 'UpStream'] |
|
730 |
down = [attr.AssocItem for attr in freezed_attrs if attr.Attribute == 'DownStream'] |
|
731 |
if up and down: |
|
732 |
if (up[0] is spec[0] and down[0] is spec[1]) or (up[0] is spec[1] and down[0] is spec[0]): |
|
733 |
dupl = True |
|
734 |
break |
|
735 |
if dupl: |
|
736 |
continue |
|
737 |
|
|
722 | 738 |
for connector in spec[0].connectors: |
723 | 739 |
if connector.connectedItem is spec[1]: |
724 | 740 |
spec_break = SymbolSvgItem.createItem(symbol.getType(), None, svgFilePath) |
... | ... | |
827 | 843 |
spec_break_item.transfer.onRemoved.connect(App.mainWnd().itemRemoved) |
828 | 844 |
spec_break_item.addSvgItemToScene(worker.graphicsView.scene) |
829 | 845 |
|
846 |
spec_break_items.extend(freezed_spec_breaks) |
|
847 |
|
|
830 | 848 |
worker.updateProgress.emit(tracer.maxValue) |
831 | 849 |
|
832 | 850 |
# trace special item |
DTI_PID/DTI_PID/Shapes/EngineeringSpecBreakItem.py | ||
---|---|---|
43 | 43 |
|
44 | 44 |
self._properties = \ |
45 | 45 |
{\ |
46 |
SymbolProp(None, 'Supplied By', 'String'):None
|
|
46 |
SymbolProp(None, 'Freeze', 'Boolean'):False
|
|
47 | 47 |
} |
48 | 48 |
|
49 | 49 |
def is_connected(self, item): |
내보내기 Unified diff