개정판 363cb803
issue #improve link attr
Change-Id: I00871bf1d7271f09898d2f5f924469ac5564ea67
DTI_PID/DTI_PID/Shapes/QEngineeringSizeTextItem.py | ||
---|---|---|
93 | 93 |
selected = symbol |
94 | 94 | |
95 | 95 |
if selected is not None: |
96 |
if selected.add_assoc_item(self): |
|
97 |
self.owner = selected |
|
96 |
attrs = selected.getAttributes(findOwner=True) |
|
97 |
target_attrs = [] |
|
98 |
for attr in attrs: |
|
99 |
if attr.AttributeType == 'Size Text Item': |
|
100 |
target_attrs.append(attr) |
|
101 | ||
102 |
for target_attr in sorted(target_attrs, key=lambda param:int(param.AttrAt)): |
|
103 |
if target_attr.AssocItem is None and selected.add_assoc_item(self, at=int(target_attr.AttrAt)): |
|
104 |
target_attr.AssocItem = self |
|
105 |
self.owner = selected |
|
98 | 106 | |
99 | 107 |
except Exception as ex: |
100 | 108 |
from App import App |
내보내기 Unified diff