mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Add surface collection to RimTools
This commit is contained in:
@@ -23,11 +23,10 @@
|
||||
#include "RimAnnotationLineAppearance.h"
|
||||
#include "RimEnsembleSurface.h"
|
||||
#include "RimExtrudedCurveIntersection.h"
|
||||
#include "RimOilField.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimSurface.h"
|
||||
#include "RimSurfaceCollection.h"
|
||||
#include "RimSurfaceIntersectionBand.h"
|
||||
#include "RimTools.h"
|
||||
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
@@ -37,21 +36,12 @@
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicCreateSurfaceIntersectionBandFeature, "RicCreateSurfaceIntersectionBandFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimSurfaceCollection* RicCreateSurfaceIntersectionBandFeature::surfaceCollection()
|
||||
{
|
||||
RimProject* proj = RimProject::current();
|
||||
return proj->activeOilField()->surfaceCollection();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicCreateSurfaceIntersectionBandFeature::isCommandEnabled() const
|
||||
{
|
||||
auto* surfColl = RicCreateSurfaceIntersectionBandFeature::surfaceCollection();
|
||||
auto* surfColl = RimTools::surfaceCollection();
|
||||
auto surfaces = surfColl->ensembleSurfaces();
|
||||
|
||||
return !surfaces.empty();
|
||||
@@ -67,7 +57,7 @@ void RicCreateSurfaceIntersectionBandFeature::onActionTriggered( bool isChecked
|
||||
{
|
||||
RimEnsembleSurface* firstEnsembleSurface = nullptr;
|
||||
{
|
||||
auto surfColl = RicCreateSurfaceIntersectionBandFeature::surfaceCollection();
|
||||
auto surfColl = RimTools::surfaceCollection();
|
||||
auto surfaces = surfColl->ensembleSurfaces();
|
||||
if ( !surfaces.empty() ) firstEnsembleSurface = surfaces.front();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user