Skip to content

Commit

Permalink
Two small mesh layer GUI fixes
Browse files Browse the repository at this point in the history
- update native/triangular mesh enabled/disabled setting from layer
- update time slider/cobmo from layer
  • Loading branch information
wonder-sk authored and nyalldawson committed Oct 3, 2018
1 parent de1a546 commit 36d33ee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/app/mesh/qgsmeshrendereractivedatasetwidget.cpp
Expand Up @@ -87,10 +87,13 @@ void QgsMeshRendererActiveDatasetWidget::setTimeRange()
}

// update slider
mDatasetSlider->blockSignals( true );
mDatasetSlider->setMinimum( 0 );
mDatasetSlider->setMaximum( datasetCount - 1 );
mDatasetSlider->blockSignals( false );

// update combobox
mTimeComboBox->blockSignals( true );
mTimeComboBox->clear();
if ( groupWithMaximumDatasets > -1 )
{
Expand All @@ -102,6 +105,7 @@ void QgsMeshRendererActiveDatasetWidget::setTimeRange()
mTimeComboBox->addItem( timeToString( time ), time );
}
}
mTimeComboBox->blockSignals( false );

// enable/disable time controls depending on whether the data set is time varying
bool isTimeVarying = datasetCount > 1;
Expand Down
3 changes: 3 additions & 0 deletions src/app/mesh/qgsrenderermeshpropertieswidget.cpp
Expand Up @@ -110,6 +110,9 @@ void QgsRendererMeshPropertiesWidget::syncToLayer()
mNativeMeshSettingsWidget->syncToLayer();
mTriangularMeshSettingsWidget->syncToLayer();

mNativeMeshGroup->setChecked( mMeshLayer ? mMeshLayer->rendererSettings().nativeMeshSettings().isEnabled() : false );
mTriangularMeshGroup->setChecked( mMeshLayer ? mMeshLayer->rendererSettings().triangularMeshSettings().isEnabled() : false );

onActiveScalarGroupChanged( mMeshRendererActiveDatasetWidget->activeScalarDatasetGroup() );
onActiveVectorGroupChanged( mMeshRendererActiveDatasetWidget->activeVectorDatasetGroup() );
}
Expand Down

0 comments on commit 36d33ee

Please sign in to comment.