개정판 8471ca2b
add multiple label error
Change-Id: I91bdc443b09130d332ab7d2fcf18c03ef9500db4
DTI_PID/DTI_PID/Shapes/SymbolSvgItem.py | ||
---|---|---|
291 | 291 |
if not self.EvaluatedLabel('OWNERSYMBOL'): |
292 | 292 |
error = SymbolSvgItem.createItem('Error', None, dataPath) |
293 | 293 |
error.parent = self |
294 |
error.msg = self.tr('Label error') |
|
294 |
error.msg = self.tr('No Label error')
|
|
295 | 295 |
error.setToolTip(error.msg) |
296 | 296 |
error.area = self.area |
297 | 297 |
error.name = 'Error' |
298 | 298 |
errors.append(error) |
299 |
else: |
|
300 |
labels = [item for item in self.scene().items() if issubclass(type(item), SymbolSvgItem) and (item.iType == 19 or item.iType == 29 or item.iType == 30)] |
|
301 |
labels = [label for label in labels if label.EvaluatedAttribute('OWNERSYMBOL') == self] |
|
302 |
if len(labels) > 1: |
|
303 |
error = SymbolSvgItem.createItem('Error', None, dataPath) |
|
304 |
error.parent = self |
|
305 |
error.msg = self.tr('Multiple Label error') |
|
306 |
error.setToolTip(error.msg) |
|
307 |
error.area = self.area |
|
308 |
error.name = 'Error' |
|
309 |
errors.append(error) |
|
299 | 310 |
|
300 | 311 |
# set error position |
301 | 312 |
for error in errors: |
내보내기 Unified diff