개정판 9ba505fc
issue #563: replace table attr reference test, by ordering
Change-Id: I38787c0949abae09bc83594f8d285f933f355c0f
DTI_PID/DTI_PID/Shapes/EngineeringAbstractItem.py | ||
---|---|---|
414 | 414 |
|
415 | 415 |
_texts = self.texts() |
416 | 416 |
_symbols = self.symbols(symbol_attr_number + 1) |
417 |
for attr in [_attr for _attr in targetAttrs if _attr.AttributeType != 'Combined' and _attr.AttributeType != 'Reference']: |
|
417 |
|
|
418 |
# copy old values |
|
419 |
for attr in targetAttrs: |
|
418 | 420 |
matches = [_attr for _attr, _ in self.attrs.items() if _attr.UID == attr.UID] |
419 | 421 |
if matches: |
420 | 422 |
if matches[0].AttributeType == 'Spec' and not self.attrs[matches[0]]: |
... | ... | |
425 | 427 |
else: |
426 | 428 |
if attr.AttributeType != 'Spec': |
427 | 429 |
_attrs[attr] = '' |
430 |
self.attrs = _attrs |
|
428 | 431 |
|
432 |
for attr in [_attr for _attr in self.attrs if _attr.AttributeType != 'Combined' and _attr.AttributeType != 'Reference']: |
|
429 | 433 |
# if attr.Freeze: continue # do not evaluate value if attribute is frozen |
430 | 434 |
if attr.AttributeType == 'Text Item' or attr.AttributeType == 'Valve Oper Code': |
431 | 435 |
at = int(attr.AttrAt) |
... | ... | |
511 | 515 |
for _attr, _value in _attrs.items(): |
512 | 516 |
if _value is None or _value == '': |
513 | 517 |
_attr.AssocItem = None |
514 |
|
|
515 |
self.attrs = _attrs |
|
516 | 518 |
except Exception as ex: |
517 | 519 |
from App import App |
518 | 520 |
from AppDocData import MessageType |
내보내기 Unified diff