Skip to content

Commit

Permalink
Force legend update when raster properties changes
Browse files Browse the repository at this point in the history
Fixes #18608 - Layer tree embedded widgets do not show up unless you move layer
  • Loading branch information
elpaso committed Oct 6, 2018
1 parent 81db005 commit 56149ff
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/app/qgsrasterlayerproperties.cpp
Expand Up @@ -55,6 +55,7 @@
#include "qgshuesaturationfilter.h"
#include "qgshillshaderendererwidget.h"
#include "qgssettings.h"
#include "qgsmaplayerlegend.h"

#include <QDesktopServices>
#include <QTableWidgetItem>
Expand Down Expand Up @@ -1052,9 +1053,13 @@ void QgsRasterLayerProperties::apply()
mRasterLayer->setCustomProperty( "WMSPublishDataSourceUrl", mPublishDataSourceUrlCheckBox->isChecked() );
mRasterLayer->setCustomProperty( "WMSBackgroundLayer", mBackgroundLayerCheckBox->isChecked() );

// update symbology

// update symbology (this is now disconnected)
emit refreshLegend( mRasterLayer->id(), false );

// Force a redraw of the legend
mRasterLayer->setLegend( QgsMapLayerLegend::defaultRasterLegend( mRasterLayer ) );

//make sure the layer is redrawn
mRasterLayer->triggerRepaint();

Expand Down

0 comments on commit 56149ff

Please sign in to comment.