개정판 98d0af30
issue #563: findowner speed improve testing
Change-Id: Ib692d79afb019b1ba64448bc6139629a4af3df28
DTI_PID/DTI_PID/Shapes/EngineeringAbstractItem.py | ||
---|---|---|
237 | 237 |
|
238 | 238 |
return res |
239 | 239 |
|
240 |
def getAttributes(self): |
|
240 |
def getAttributes(self, findOwner=False):
|
|
241 | 241 |
"""calculate all attributes of item""" |
242 | 242 |
import re |
243 | 243 |
|
244 |
if findOwner and hasattr(self, '_skip'): |
|
245 |
return self.attrs |
|
246 |
elif findOwner and not hasattr(self, '_skip'): |
|
247 |
self._skip = True |
|
248 |
|
|
244 | 249 |
_attrs = {} |
245 | 250 |
try: |
246 | 251 |
from AppDocData import AppDocData |
DTI_PID/DTI_PID/Shapes/EngineeringTextItem.py | ||
---|---|---|
866 | 866 |
|
867 | 867 |
target_symbols = [] |
868 | 868 |
for symbol in symbols: |
869 |
attrs = symbol.getAttributes() |
|
869 |
attrs = symbol.getAttributes(findOwner=True)
|
|
870 | 870 |
|
871 | 871 |
freeze = False |
872 | 872 |
for attr in attrs: |
... | ... | |
894 | 894 |
selected = symbol |
895 | 895 |
|
896 | 896 |
if selected is not None: |
897 |
attrs = selected.getAttributes() |
|
897 |
attrs = selected.getAttributes(findOwner=True)
|
|
898 | 898 |
target_attrs = [] |
899 | 899 |
for attr in attrs: |
900 | 900 |
ret = attr.Codes.find_match_exactly(self.text()) |
내보내기 Unified diff