mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#8991 3D grid cross plot: Select correct grid model.
This commit is contained in:
parent
2fdd5875ea
commit
5b4434439e
@ -68,8 +68,12 @@ void RicCreateGridCrossPlotFeature::onActionTriggered( bool isChecked )
|
||||
}
|
||||
else
|
||||
{
|
||||
// Triggered from context menu: get the selected view
|
||||
// TODO: get the filter from somewhere
|
||||
caf::PdmObject* selectedObject = dynamic_cast<caf::PdmObject*>( caf::SelectionManager::instance()->selectedItem() );
|
||||
if ( !selectedObject ) return;
|
||||
|
||||
RimGridView* cellFilterView = nullptr;
|
||||
selectedObject->firstAncestorOrThisOfType( cellFilterView );
|
||||
if ( cellFilterView ) dataSet->setCellFilterView( cellFilterView );
|
||||
}
|
||||
|
||||
plot->loadDataAndUpdate();
|
||||
|
@ -165,18 +165,29 @@ void RimGridCrossPlotDataSet::setCellFilterView( RimGridView* cellFilterView )
|
||||
RigEclipseResultAddress resAddr = eclipseView->cellResult()->eclipseResultAddress();
|
||||
if ( resAddr.isValid() )
|
||||
{
|
||||
m_xAxisProperty->setResultType( resAddr.resultCatType() );
|
||||
m_xAxisProperty->setResultVariable( resAddr.resultName() );
|
||||
m_yAxisProperty->setResultType( RiaDefines::ResultCatType::STATIC_NATIVE );
|
||||
m_yAxisProperty->setResultVariable( "DEPTH" );
|
||||
m_timeStep = eclipseView->currentTimeStep();
|
||||
m_grouping = NO_GROUPING;
|
||||
if ( eclipseView->eclipseCase() && eclipseView->eclipseCase()->activeFormationNames() )
|
||||
|
||||
RimEclipseCase* eclipseCase = eclipseView->eclipseCase();
|
||||
if ( eclipseCase )
|
||||
{
|
||||
m_case = eclipseCase;
|
||||
m_xAxisProperty->setEclipseCase( eclipseCase );
|
||||
m_yAxisProperty->setEclipseCase( eclipseCase );
|
||||
m_groupingProperty->setEclipseCase( eclipseCase );
|
||||
|
||||
if ( eclipseCase->activeFormationNames() )
|
||||
{
|
||||
m_grouping = GROUP_BY_FORMATION;
|
||||
m_groupingProperty->legendConfig()->setColorLegend(
|
||||
RimRegularLegendConfig::mapToColorLegend( RimRegularLegendConfig::ColorRangesType::CATEGORY ) );
|
||||
}
|
||||
}
|
||||
|
||||
m_xAxisProperty->setResultType( resAddr.resultCatType() );
|
||||
m_xAxisProperty->setResultVariable( resAddr.resultName() );
|
||||
m_yAxisProperty->setResultType( RiaDefines::ResultCatType::STATIC_NATIVE );
|
||||
m_yAxisProperty->setResultVariable( "DEPTH" );
|
||||
m_timeStep = eclipseView->currentTimeStep();
|
||||
|
||||
RimGridCrossPlot* parentPlot = nullptr;
|
||||
firstAncestorOrThisOfType( parentPlot );
|
||||
|
Loading…
Reference in New Issue
Block a user