Skip to content
Permalink
Browse files

Two small mesh layer GUI fixes

- 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 36d33ee65d012a19a77aebdd673f85867d3d59dd
@@ -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 )
{
@@ -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;
@@ -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() );
}

0 comments on commit 36d33ee

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