Skip to content

Commit

Permalink
fix updating color ramp after loading from file
Browse files Browse the repository at this point in the history
  • Loading branch information
vcloarec authored and nyalldawson committed Apr 29, 2021
1 parent d4cf534 commit 77696a8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/qgsmaplayerlegend.cpp
Expand Up @@ -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() );
Expand Down
1 change: 1 addition & 0 deletions src/gui/raster/qgscolorrampshaderwidget.cpp
Expand Up @@ -512,6 +512,7 @@ void QgsColorRampShaderWidget::mLoadFromFileButton_clicked()
settings.setValue( QStringLiteral( "lastColorMapDir" ), fileInfo.absoluteDir().absolutePath() );

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

Expand Down

0 comments on commit 77696a8

Please sign in to comment.