개정판 bcf20e4e
fix
Change-Id: If1b9578d343e6f88a92d1ff0bddc52557c8fb2d2
DTI_PID/DTI_PID/Shapes/EngineeringTextItem.py | ||
---|---|---|
200 | 200 |
app_doc_data = AppDocData.instance() |
201 | 201 |
dataPath = app_doc_data.getErrorItemSvgPath() |
202 | 202 |
|
203 |
if self.owner: |
|
204 |
if self not in self.owner.associations(): |
|
205 |
error = SymbolSvgItem.createItem('Error', None, dataPath) |
|
206 |
error.parent = self |
|
207 |
error.msg = self.tr('Association error') |
|
208 |
error.setToolTip(error.msg) |
|
209 |
error.area = self.area |
|
210 |
error.name = 'Error' |
|
211 |
error.items = [ self.owner ] |
|
212 |
errors.append(error) |
|
213 |
|
|
214 |
error.setPosition([self.sceneBoundingRect().center().x(), self.sceneBoundingRect().center().y()]) |
|
215 |
|
|
216 | 203 |
# check overlapping |
217 | 204 |
texts = [item for item in self.scene().items() if item is not self and issubclass(type(item), QEngineeringTextItem)] |
218 | 205 |
for text in texts: |
... | ... | |
245 | 232 |
errors.append(error) |
246 | 233 |
|
247 | 234 |
error.setPosition([self.sceneBoundingRect().center().x(), self.sceneBoundingRect().center().y()]) |
235 |
|
|
236 |
if self.owner: |
|
237 |
if self not in self.owner.associations(): |
|
238 |
error = SymbolSvgItem.createItem('Error', None, dataPath) |
|
239 |
error.parent = self |
|
240 |
error.msg = self.tr('Association error') |
|
241 |
error.setToolTip(error.msg) |
|
242 |
error.area = self.area |
|
243 |
error.name = 'Error' |
|
244 |
error.items = [ self.owner ] |
|
245 |
errors.append(error) |
|
246 |
|
|
247 |
error.setPosition([self.sceneBoundingRect().center().x(), self.sceneBoundingRect().center().y()]) |
|
248 | 248 |
|
249 | 249 |
except Exception as ex: |
250 | 250 |
from App import App |
내보내기 Unified diff