File tree Expand file tree Collapse file tree 1 file changed +21
-11
lines changed Expand file tree Collapse file tree 1 file changed +21
-11
lines changed Original file line number Diff line number Diff line change @@ -168,21 +168,25 @@ QString QgsStyleV2ManagerDialog::currentItemName()
168
168
169
169
void QgsStyleV2ManagerDialog::addItem ()
170
170
{
171
+ bool changed = false ;
171
172
if ( currentItemType () < 3 )
172
173
{
173
- addSymbol ();
174
+ changed = addSymbol ();
174
175
}
175
176
else if ( currentItemType () == 3 )
176
177
{
177
- addColorRamp ();
178
+ changed = addColorRamp ();
178
179
}
179
180
else
180
181
{
181
182
Q_ASSERT ( 0 && " not implemented" );
182
183
}
183
184
184
- populateList ();
185
- populateTypes ();
185
+ if ( changed )
186
+ {
187
+ populateList ();
188
+ populateTypes ();
189
+ }
186
190
}
187
191
188
192
bool QgsStyleV2ManagerDialog::addSymbol ()
@@ -303,20 +307,22 @@ bool QgsStyleV2ManagerDialog::addColorRamp()
303
307
304
308
void QgsStyleV2ManagerDialog::editItem ()
305
309
{
310
+ bool changed = false ;
306
311
if ( currentItemType () < 3 )
307
312
{
308
- editSymbol ();
313
+ changed = editSymbol ();
309
314
}
310
315
else if ( currentItemType () == 3 )
311
316
{
312
- editColorRamp ();
317
+ changed = editColorRamp ();
313
318
}
314
319
else
315
320
{
316
321
Q_ASSERT ( 0 && " not implemented" );
317
322
}
318
323
319
- populateList ();
324
+ if ( changed )
325
+ populateList ();
320
326
}
321
327
322
328
bool QgsStyleV2ManagerDialog::editSymbol ()
@@ -392,21 +398,25 @@ bool QgsStyleV2ManagerDialog::editColorRamp()
392
398
393
399
void QgsStyleV2ManagerDialog::removeItem ()
394
400
{
401
+ bool changed = false ;
395
402
if ( currentItemType () < 3 )
396
403
{
397
- removeSymbol ();
404
+ changed = removeSymbol ();
398
405
}
399
406
else if ( currentItemType () == 3 )
400
407
{
401
- removeColorRamp ();
408
+ changed = removeColorRamp ();
402
409
}
403
410
else
404
411
{
405
412
Q_ASSERT ( 0 && " not implemented" );
406
413
}
407
414
408
- populateList ();
409
- populateTypes ();
415
+ if ( changed )
416
+ {
417
+ populateList ();
418
+ populateTypes ();
419
+ }
410
420
}
411
421
412
422
bool QgsStyleV2ManagerDialog::removeSymbol ()
You can’t perform that action at this time.
0 commit comments