Skip to content
Permalink
Browse files

fix updating color ramp after loading from file

  • Loading branch information
vcloarec authored and nyalldawson committed Apr 29, 2021
1 parent d4cf534 commit 77696a8128fad48440aeb3818f7df4d8a040ae7e
Showing with 2 additions and 1 deletion.
  1. +1 −1 src/core/qgsmaplayerlegend.cpp
  2. +1 −0 src/gui/raster/qgscolorrampshaderwidget.cpp
@@ -524,7 +524,7 @@ QList<QgsLayerTreeModelLegendNode *> QgsDefaultMeshLayerLegend::createLayerTreeM
// for interpolated shaders we use a ramp legend node
if ( !shader.colorRampItemList().isEmpty() )
{
nodes << new QgsColorRampLegendNode( nodeLayer, shader.sourceColorRamp()->clone(),
nodes << new QgsColorRampLegendNode( nodeLayer, shader.createColorRamp(),
shader.legendSettings() ? *shader.legendSettings() : QgsColorRampLegendNodeSettings(),
shader.minimumValue(),
shader.maximumValue() );
@@ -512,6 +512,7 @@ void QgsColorRampShaderWidget::mLoadFromFileButton_clicked()
settings.setValue( QStringLiteral( "lastColorMapDir" ), fileInfo.absoluteDir().absolutePath() );

loadMinimumMaximumFromTree();
updateColorRamp();
emit widgetChanged();
}

0 comments on commit 77696a8

Please sign in to comment.