Skip to content

Commit

Permalink
emit signal after changing style
Browse files Browse the repository at this point in the history
  • Loading branch information
vcloarec authored and nyalldawson committed Jun 9, 2022
1 parent 4ebeee0 commit 7e51340
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/core/mesh/qgsmeshlayer.cpp
Expand Up @@ -173,14 +173,9 @@ QString QgsMeshLayer::loadDefaultStyle( bool &resultFlag )
for ( const int index : groupsList )
assignDefaultStyleToDatasetGroup( index );

if ( !groupsList.isEmpty() )
{
emit rendererChanged();
emitStyleChanged();
}

QgsMeshRendererMeshSettings meshSettings;
if ( groupsList.count() > 0 )
if ( !groupsList.isEmpty() )
{
// Show data from the first dataset group
mRendererSettings.setActiveScalarDatasetGroup( 0 );
Expand Down Expand Up @@ -224,6 +219,12 @@ QString QgsMeshLayer::loadDefaultStyle( bool &resultFlag )
mRendererSettings.setScalarSettings( i, scalarSettings );
}

if ( !groupsList.isEmpty() )
{
emit rendererChanged();
emitStyleChanged();
}

return QgsMapLayer::loadDefaultStyle( resultFlag );
}

Expand Down

0 comments on commit 7e51340

Please sign in to comment.