File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
Expand file tree Collapse file tree 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()
16221622
16231623void QgsRasterLayerProperties::on_pbnSaveDefaultStyle_clicked ()
16241624{
1625+
1626+ apply (); // make sure the style to save is uptodate
1627+
16251628 // a flag passed by reference
16261629 bool defaultSavedFlag = false ;
16271630 // after calling this the above flag will be set true for success
@@ -1691,6 +1694,8 @@ void QgsRasterLayerProperties::on_pbnSaveStyleAs_clicked()
16911694 if ( !outputFileName.endsWith ( " .qml" , Qt::CaseInsensitive ) )
16921695 outputFileName += " .qml" ;
16931696
1697+ apply (); // make sure the style to save is uptodate
1698+
16941699 bool defaultLoadedFlag = false ;
16951700 QString message = mRasterLayer ->saveNamedStyle ( outputFileName, defaultLoadedFlag );
16961701 if ( defaultLoadedFlag )
You can’t perform that action at this time.
0 commit comments