Navigation Menu

Skip to content

Commit

Permalink
fix deactivate mesh layer contours
Browse files Browse the repository at this point in the history
  • Loading branch information
vcloarec authored and github-actions[bot] committed Apr 25, 2023
1 parent 245703f commit aedbb86
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/core/mesh/qgsmeshlayer.cpp
Expand Up @@ -1430,15 +1430,17 @@ QgsAbstractProfileGenerator *QgsMeshLayer::createProfileGenerator( const QgsProf
void QgsMeshLayer::checkSymbologyConsistency()
{
const QList<int> groupIndexes = mDatasetGroupStore->datasetGroupIndexes();
if ( !groupIndexes.contains( mRendererSettings.activeScalarDatasetGroup() ) )
if ( !groupIndexes.contains( mRendererSettings.activeScalarDatasetGroup() ) &&
mRendererSettings.activeScalarDatasetGroup() != -1 )
{
if ( !groupIndexes.empty() )
mRendererSettings.setActiveScalarDatasetGroup( groupIndexes.first() );
else
mRendererSettings.setActiveScalarDatasetGroup( -1 );
}

if ( !groupIndexes.contains( mRendererSettings.activeVectorDatasetGroup() ) )
if ( !groupIndexes.contains( mRendererSettings.activeVectorDatasetGroup() ) &&
mRendererSettings.activeVectorDatasetGroup() != -1 )
{
mRendererSettings.setActiveVectorDatasetGroup( -1 );
}
Expand Down

0 comments on commit aedbb86

Please sign in to comment.