File tree 1 file changed +5
-0
lines changed
1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -1622,6 +1622,9 @@ void QgsRasterLayerProperties::on_pbnLoadDefaultStyle_clicked()
1622
1622
1623
1623
void QgsRasterLayerProperties::on_pbnSaveDefaultStyle_clicked ()
1624
1624
{
1625
+
1626
+ apply (); // make sure the style to save is uptodate
1627
+
1625
1628
// a flag passed by reference
1626
1629
bool defaultSavedFlag = false ;
1627
1630
// after calling this the above flag will be set true for success
@@ -1691,6 +1694,8 @@ void QgsRasterLayerProperties::on_pbnSaveStyleAs_clicked()
1691
1694
if ( !outputFileName.endsWith ( " .qml" , Qt::CaseInsensitive ) )
1692
1695
outputFileName += " .qml" ;
1693
1696
1697
+ apply (); // make sure the style to save is uptodate
1698
+
1694
1699
bool defaultLoadedFlag = false ;
1695
1700
QString message = mRasterLayer ->saveNamedStyle ( outputFileName, defaultLoadedFlag );
1696
1701
if ( defaultLoadedFlag )
You can’t perform that action at this time.
0 commit comments