diff --git a/images/images.qrc b/images/images.qrc index 224d0091104d..562986a34b4b 100644 --- a/images/images.qrc +++ b/images/images.qrc @@ -185,6 +185,7 @@ themes/default/mIconDbSchema.png themes/default/mIconDelete.png themes/default/mIconEditable.png + themes/default/mIconEditableEdits.png themes/default/mIconExpand.png themes/default/mIconFavourites.png themes/default/mIconFirst.png @@ -384,6 +385,7 @@ themes/gis/mActionZoomToSelected.png themes/gis/mIconClose.png themes/gis/mIconEditable.png + themes/gis/mIconEditableEdits.png themes/gis/mIconLineLayer.png themes/gis/mIconPointLayer.png themes/gis/mIconPolygonLayer.png diff --git a/images/themes/default/mIconEditableEdits.png b/images/themes/default/mIconEditableEdits.png new file mode 100644 index 000000000000..08de7115efc5 Binary files /dev/null and b/images/themes/default/mIconEditableEdits.png differ diff --git a/images/themes/gis/mIconEditableEdits.png b/images/themes/gis/mIconEditableEdits.png new file mode 100644 index 000000000000..f694f33e6649 Binary files /dev/null and b/images/themes/gis/mIconEditableEdits.png differ diff --git a/src/app/legend/qgslegendlayer.cpp b/src/app/legend/qgslegendlayer.cpp index 77bb1d3d7feb..52f82fd6c7e7 100644 --- a/src/app/legend/qgslegendlayer.cpp +++ b/src/app/legend/qgslegendlayer.cpp @@ -335,7 +335,16 @@ void QgsLegendLayer::updateIcon() //editable if ( theLayer->isEditable() ) { - QPixmap myPixmap = QgsApplication::getThemePixmap( "/mIconEditable.png" ); + QPixmap myPixmap; + QgsVectorLayer* vlayer = qobject_cast( theLayer ); + if ( vlayer->isModified() ) + { + myPixmap = QgsApplication::getThemePixmap( "/mIconEditableEdits.png" ); + } + else + { + myPixmap = QgsApplication::getThemePixmap( "/mIconEditable.png" ); + } // use editable icon instead of the layer's type icon newIcon = myPixmap; @@ -606,6 +615,7 @@ void QgsLegendLayer::updateAfterLayerModification( bool onlyGeomChanged ) if ( onlyGeomChanged ) { + updateIcon(); return; }