Skip to content
Permalink
Browse files

Save current active tab in render mesh properties

  • Loading branch information
vcloarec authored and nyalldawson committed Mar 17, 2020
1 parent e523572 commit d64586a644fcb00e40f60415eb8dc8c2e320dc25
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/app/mesh/qgsrenderermeshpropertieswidget.cpp
@@ -123,6 +123,9 @@ void QgsRendererMeshPropertiesWidget::apply()
settings.setAveragingMethod( averagingMethod.get() );
mMeshLayer->setRendererSettings( settings );
mMeshLayer->triggerRepaint();

QgsSettings windowsSettings;
windowsSettings.setValue( QStringLiteral( "/Windows/RendererMeshProperties/tab" ), mStyleOptionsTab->currentIndex() );
}

void QgsRendererMeshPropertiesWidget::syncToLayer()
@@ -147,6 +150,12 @@ void QgsRendererMeshPropertiesWidget::syncToLayer()
bool hasEdges = ( mMeshLayer->dataProvider() &&
mMeshLayer->dataProvider()->contains( QgsMesh::ElementType::Edge ) );
mEdgeMeshGroupBox->setVisible( hasEdges );

QgsSettings settings;
if ( !settings.contains( QStringLiteral( "/Windows/RendererMeshProperties/tab" ) ) )
settings.setValue( QStringLiteral( "/Windows/RendererMeshProperties/tab" ), 0 );
else
mStyleOptionsTab->setCurrentIndex( settings.value( QStringLiteral( "/Windows/RendererMeshProperties/tab" ) ).toInt() );
}

void QgsRendererMeshPropertiesWidget::onActiveScalarGroupChanged( int groupIndex )

0 comments on commit d64586a

Please sign in to comment.
You can’t perform that action at this time.