mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Use helper function to get polygon collection
This commit is contained in:
@@ -44,8 +44,6 @@
|
||||
#include "RimEclipseCaseEnsemble.h"
|
||||
#include "RimEclipseContourMapProjection.h"
|
||||
#include "RimEclipseResultDefinition.h"
|
||||
#include "RimOilField.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimSimWellInViewCollection.h"
|
||||
#include "RimStatisticsContourMapProjection.h"
|
||||
#include "RimStatisticsContourMapView.h"
|
||||
@@ -213,8 +211,7 @@ void RimStatisticsContourMap::defineUiOrdering( QString uiConfigName, caf::PdmUi
|
||||
if ( m_enableFormationFilter ) formationGrp->add( &m_selectedFormations );
|
||||
}
|
||||
|
||||
RimProject* proj = RimProject::current();
|
||||
if ( auto polygonCollection = proj->activeOilField()->polygonCollection().p() )
|
||||
if ( auto polygonCollection = RimTools::polygonCollection() )
|
||||
{
|
||||
if ( !polygonCollection->allPolygons().empty() )
|
||||
{
|
||||
@@ -389,8 +386,7 @@ QList<caf::PdmOptionItemInfo> RimStatisticsContourMap::calculateValueOptions( co
|
||||
}
|
||||
else if ( &m_selectedPolygons == fieldNeedingOptions )
|
||||
{
|
||||
RimProject* proj = RimProject::current();
|
||||
if ( auto polygonCollection = proj->activeOilField()->polygonCollection().p() )
|
||||
if ( auto polygonCollection = RimTools::polygonCollection() )
|
||||
{
|
||||
for ( auto p : polygonCollection->allPolygons() )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user