mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Removed more functions from MainGrid
p4#: 20468
This commit is contained in:
@@ -115,11 +115,11 @@ void RimCellRangeFilter::setDefaultValues()
|
||||
{
|
||||
CVF_ASSERT(m_parentContainer);
|
||||
|
||||
RigMainGrid* mainGrid = m_parentContainer->mainGrid();
|
||||
if (mainGrid)
|
||||
RigActiveCellInfo* actCellInfo = m_parentContainer->activeCellInfo();
|
||||
if (actCellInfo)
|
||||
{
|
||||
cvf::Vec3st min, max;
|
||||
mainGrid->matrixModelActiveCellsBoundingBox(min, max);
|
||||
actCellInfo->matrixModelActiveCellsBoundingBox(min, max);
|
||||
|
||||
// Adjust to Eclipse indexing
|
||||
min.x() = min.x() + 1;
|
||||
@@ -159,10 +159,13 @@ void RimCellRangeFilter::defineEditorAttribute(const caf::PdmFieldHandle* field,
|
||||
}
|
||||
|
||||
RigMainGrid* mainGrid = m_parentContainer->mainGrid();
|
||||
if (mainGrid)
|
||||
CVF_ASSERT(mainGrid);
|
||||
|
||||
RigActiveCellInfo* actCellInfo = m_parentContainer->activeCellInfo();
|
||||
if (actCellInfo)
|
||||
{
|
||||
cvf::Vec3st min, max;
|
||||
mainGrid->matrixModelActiveCellsBoundingBox(min, max);
|
||||
actCellInfo->matrixModelActiveCellsBoundingBox(min, max);
|
||||
|
||||
// Adjust to Eclipse indexing
|
||||
min.x() = min.x() + 1;
|
||||
|
||||
@@ -97,8 +97,6 @@ void RimCellRangeFilterCollection::compoundCellRangeFilter(cvf::CellRangeFilter*
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -126,9 +124,25 @@ RigMainGrid* RimCellRangeFilterCollection::mainGrid() const
|
||||
m_reservoirView->eclipseCase()->reservoirData()->mainGrid())
|
||||
{
|
||||
|
||||
RigMainGrid* mainGrid = m_reservoirView->eclipseCase()->reservoirData()->mainGrid();
|
||||
return m_reservoirView->eclipseCase()->reservoirData()->mainGrid();
|
||||
}
|
||||
|
||||
return mainGrid;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigActiveCellInfo* RimCellRangeFilterCollection::activeCellInfo() const
|
||||
{
|
||||
if (m_reservoirView &&
|
||||
m_reservoirView->eclipseCase() &&
|
||||
m_reservoirView->eclipseCase()->reservoirData() &&
|
||||
m_reservoirView->eclipseCase()->reservoirData()->activeCellInfo())
|
||||
{
|
||||
|
||||
return m_reservoirView->eclipseCase()->reservoirData()->activeCellInfo();
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@@ -209,3 +223,4 @@ bool RimCellRangeFilterCollection::hasActiveFilters() const
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
|
||||
#include "RimCellRangeFilter.h"
|
||||
|
||||
class RigActiveCellInfo;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
///
|
||||
@@ -42,9 +44,10 @@ public:
|
||||
void compoundCellRangeFilter(cvf::CellRangeFilter* cellRangeFilter) const;
|
||||
bool hasActiveFilters() const;
|
||||
|
||||
void setReservoirView(RimReservoirView* reservoirView);
|
||||
RimReservoirView* reservoirView();
|
||||
RigMainGrid* mainGrid() const;
|
||||
void setReservoirView(RimReservoirView* reservoirView);
|
||||
RimReservoirView* reservoirView();
|
||||
RigMainGrid* mainGrid() const;
|
||||
RigActiveCellInfo* activeCellInfo() const;
|
||||
|
||||
// Overridden methods
|
||||
virtual void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue );
|
||||
|
||||
Reference in New Issue
Block a user