Skip to content
Permalink
Browse files

Force legend update when raster properties changes

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 56149ff39a56c8cf809ee57c1af92aef4ca882ec
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/app/qgsrasterlayerproperties.cpp
@@ -55,6 +55,7 @@
#include "qgshuesaturationfilter.h"
#include "qgshillshaderendererwidget.h"
#include "qgssettings.h"
#include "qgsmaplayerlegend.h"

#include <QDesktopServices>
#include <QTableWidgetItem>
@@ -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();

0 comments on commit 56149ff

Please sign in to comment.
You can’t perform that action at this time.