Skip to content

Commit

Permalink
Fixes invalid renderer type after loading qml style
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere authored and nyalldawson committed Oct 26, 2019
1 parent 2e9c006 commit b3257b7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/app/qgsrasterlayerproperties.cpp
Expand Up @@ -614,6 +614,14 @@ void QgsRasterLayerProperties::setRendererWidget( const QString &rendererName )
}
}

const int widgetIndex = mRenderTypeComboBox->findData( rendererName );
if ( widgetIndex != -1 )
{
mDisableRenderTypeComboBoxCurrentIndexChanged = true;
mRenderTypeComboBox->setCurrentIndex( widgetIndex );
mDisableRenderTypeComboBoxCurrentIndexChanged = false;
}

if ( mRendererWidget != oldWidget )
delete oldWidget;

Expand Down

0 comments on commit b3257b7

Please sign in to comment.