개정판 146dac87
issue #637: unify spec break attr
Change-Id: I7b0ee890102cd0ad82025f0e99417e6fba02ff7a
DTI_PID/DTI_PID/Shapes/EngineeringAbstractItem.py | ||
---|---|---|
272 | 272 |
if not (type(self) is QEngineeringLineItem or type(self) is QEngineeringVendorItem or |
273 | 273 |
type(self) is QEngineeringLineNoTextItem): |
274 | 274 |
for attr in symbolAttrs: |
275 |
if not attr.Target: |
|
276 |
continue |
|
275 | 277 |
if attr.Target is None or attr.Target == 'ALL' or \ |
276 | 278 |
[target for target in attr.Target.split(',') if self.dbUid is int(target)]: |
277 | 279 |
targetAttrs.append(attr) |
... | ... | |
283 | 285 |
for attr in [_attr for _attr in targetAttrs if _attr.AttributeType != 'Combined']: |
284 | 286 |
matches = [_attr for _attr, _ in self.attrs.items() if _attr.UID == attr.UID] |
285 | 287 |
if matches: |
288 |
if matches[0].AttributeType == 'Spec' and not self.attrs[matches[0]]: |
|
289 |
continue |
|
286 | 290 |
attr.Freeze = matches[0].Freeze # update freeze value |
287 | 291 |
attr.AssocItem = matches[0].AssocItem |
288 | 292 |
_attrs[attr] = self.attrs[matches[0]] # copy attribute value |
289 | 293 |
else: |
290 |
_attrs[attr] = '' |
|
294 |
if attr.AttributeType != 'Spec': |
|
295 |
_attrs[attr] = '' |
|
291 | 296 |
|
292 | 297 |
# if attr.Freeze: continue # do not evaluate value if attribute is frozen |
293 | 298 |
if attr.AttributeType == 'Text Item' or attr.AttributeType == 'Valve Oper Code': |
DTI_PID/DTI_PID/Shapes/EngineeringSpecBreakItem.py | ||
---|---|---|
66 | 66 |
@history kyouho 2018.07.18 Add only attr QEngineeringTextItem |
67 | 67 |
euisung 2019.01.15 return self.attrs |
68 | 68 |
''' |
69 |
''' |
|
69 | 70 |
def getAttributes(self): |
70 | 71 |
""" attributes MUST have UpStream, DownStream attribute """ |
71 | 72 |
from AppDocData import AppDocData |
... | ... | |
78 | 79 |
if attr.AttributeType != 'Spec' and attr.AssocItem: |
79 | 80 |
self.attrs[attr] = str(attr.AssocItem) |
80 | 81 |
return self.attrs |
82 |
''' |
|
81 | 83 |
|
82 | 84 |
@property |
83 | 85 |
def up_stream(self): |
내보내기 Unified diff