개정판 56bd2c0f
optimize drawing open
Change-Id: Icf84d32730e832f373b8404b358971d0b50390cb
DTI_PID/DTI_PID/Shapes/SymbolSvgItem.py | ||
---|---|---|
154 | 154 |
"""get owner""" |
155 | 155 |
import uuid |
156 | 156 |
|
157 |
if self._owner and type(self._owner) is uuid.UUID: |
|
157 |
if self.scene() and self._owner and type(self._owner) is uuid.UUID:
|
|
158 | 158 |
#matches = [x for x in self.scene().items() if hasattr(x, 'uid') and str(x.uid) == str(self._owner)] |
159 | 159 |
matches = [] |
160 | 160 |
for x in self.scene().items(): |
... | ... | |
164 | 164 |
if matches: |
165 | 165 |
self._owner = matches[0] |
166 | 166 |
|
167 |
return matches[0] if matches else None |
|
168 |
|
|
167 | 169 |
if type(self._owner) is not uuid.UUID and type(self._owner) is not str: |
168 | 170 |
return self._owner |
169 | 171 |
else: |
내보내기 Unified diff