File tree Expand file tree Collapse file tree 4 files changed +13
-1
lines changed Expand file tree Collapse file tree 4 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 185
185
<file>themes/default/mIconDbSchema.png</file>
186
186
<file>themes/default/mIconDelete.png</file>
187
187
<file>themes/default/mIconEditable.png</file>
188
+ <file>themes/default/mIconEditableEdits.png</file>
188
189
<file>themes/default/mIconExpand.png</file>
189
190
<file>themes/default/mIconFavourites.png</file>
190
191
<file>themes/default/mIconFirst.png</file>
384
385
<file>themes/gis/mActionZoomToSelected.png</file>
385
386
<file>themes/gis/mIconClose.png</file>
386
387
<file>themes/gis/mIconEditable.png</file>
388
+ <file>themes/gis/mIconEditableEdits.png</file>
387
389
<file>themes/gis/mIconLineLayer.png</file>
388
390
<file>themes/gis/mIconPointLayer.png</file>
389
391
<file>themes/gis/mIconPolygonLayer.png</file>
Original file line number Diff line number Diff line change @@ -335,7 +335,16 @@ void QgsLegendLayer::updateIcon()
335
335
// editable
336
336
if ( theLayer->isEditable () )
337
337
{
338
- QPixmap myPixmap = QgsApplication::getThemePixmap ( " /mIconEditable.png" );
338
+ QPixmap myPixmap;
339
+ QgsVectorLayer* vlayer = qobject_cast<QgsVectorLayer *>( theLayer );
340
+ if ( vlayer->isModified () )
341
+ {
342
+ myPixmap = QgsApplication::getThemePixmap ( " /mIconEditableEdits.png" );
343
+ }
344
+ else
345
+ {
346
+ myPixmap = QgsApplication::getThemePixmap ( " /mIconEditable.png" );
347
+ }
339
348
// use editable icon instead of the layer's type icon
340
349
newIcon = myPixmap;
341
350
@@ -606,6 +615,7 @@ void QgsLegendLayer::updateAfterLayerModification( bool onlyGeomChanged )
606
615
607
616
if ( onlyGeomChanged )
608
617
{
618
+ updateIcon ();
609
619
return ;
610
620
}
611
621
You can’t perform that action at this time.
1 commit comments
slarosa commentedon Dec 2, 2012
Very nice !
Thanks !