개정판 18988514
add end spec break auto freeze
Change-Id: I044ae8d93a4faf9d29a243c51cb83697acbd0628
DTI_PID/DTI_PID/MainWindow.py | ||
---|---|---|
975 | 975 |
attrs = spec_break.getAttributes() |
976 | 976 |
up = [attr.AssocItem for attr in attrs if attr.Attribute == 'UpStream'] |
977 | 977 |
down = [attr.AssocItem for attr in attrs if attr.Attribute == 'DownStream'] |
978 |
if spec_break.prop('Freeze') or (up and up[0]) or (down and down[0]):
|
|
978 |
if (up and up[0]) or (down and down[0]): |
|
979 | 979 |
usedItemPairs.append([up, down]) |
980 | 980 |
|
981 | 981 |
for spec_break in spec_breaks: |
982 | 982 |
attrs = spec_break.getAttributes() |
983 | 983 |
up = [attr.AssocItem for attr in attrs if attr.Attribute == 'UpStream'] |
984 | 984 |
down = [attr.AssocItem for attr in attrs if attr.Attribute == 'DownStream'] |
985 |
if spec_break.prop('Freeze') or (up and up[0]) or (down and down[0]):
|
|
985 |
if (up and up[0]) or (down and down[0]): |
|
986 | 986 |
continue |
987 | 987 |
|
988 | 988 |
originPoint = Point(spec_break.origin[0], spec_break.origin[1]) |
DTI_PID/DTI_PID/QtImageViewer.py | ||
---|---|---|
576 | 576 |
def dropEvent(self, event): |
577 | 577 |
"""drop a symbol""" |
578 | 578 |
from AppDocData import AppDocData |
579 |
import symbol |
|
579 |
from EngineeringEndBreakItem import QEngineeringEndBreakItem |
|
580 |
from EngineeringSpecBreakItem import QEngineeringSpecBreakItem |
|
580 | 581 |
|
581 | 582 |
if len(self.scene().items()) is 0: |
582 | 583 |
return |
... | ... | |
595 | 596 |
svg = QtImageViewer.createSymbolObject(name) |
596 | 597 |
QtImageViewer.matchSymbolToLine(self.scene(), svg, scenePos) |
597 | 598 |
if svg: |
599 |
if type(svg) is QEngineeringEndBreakItem or type(svg) is QEngineeringSpecBreakItem: |
|
600 |
svg.set_property('Freeze', True) |
|
601 |
|
|
598 | 602 |
svg.setSelected(True) |
599 | 603 |
svg.setFocus() |
600 | 604 |
self.setFocus() # set focus to graphicview |
DTI_PID/DTI_PID/Shapes/EngineeringAbstractItem.py | ||
---|---|---|
1089 | 1089 |
def add_assoc_item(self, item, at=None, force=False): |
1090 | 1090 |
""" add given item to association """ |
1091 | 1091 |
|
1092 |
from EngineeringTextItem import QEngineeringTextItem |
|
1093 |
from SymbolSvgItem import SymbolSvgItem |
|
1094 |
from EngineeringValveOperCodeTextItem import QEngineeringValveOperCodeTextItem |
|
1095 |
from QEngineeringSizeTextItem import QEngineeringSizeTextItem |
|
1096 |
|
|
1097 | 1092 |
if not force: |
1098 | 1093 |
for key in self.attrs.keys(): |
1099 | 1094 |
if key.Freeze: |
DTI_PID/DTI_PID/Shapes/SymbolSvgItem.py | ||
---|---|---|
1018 | 1018 |
from AppDocData import AppDocData |
1019 | 1019 |
from App import App |
1020 | 1020 |
|
1021 |
if self.prop('Freeze') or self.owner or self.prop('Connected Item'):
|
|
1021 |
if self.owner or self.prop('Connected Item'): |
|
1022 | 1022 |
return |
1023 | 1023 |
|
1024 | 1024 |
app_doc_data = AppDocData.instance() |
내보내기 Unified diff