mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Whitespace
This commit is contained in:
parent
7fe0b92839
commit
3acd426ead
File diff suppressed because it is too large
Load Diff
@ -3,17 +3,17 @@
|
||||
// Copyright (C) 2011- Statoil ASA
|
||||
// Copyright (C) 2013- Ceetron Solutions AS
|
||||
// Copyright (C) 2011-2012 Ceetron AS
|
||||
//
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
@ -29,22 +29,21 @@
|
||||
|
||||
#include "cafPdmUiEditorHandle.h"
|
||||
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimEclipsePropertyFilterCollection, "CellPropertyFilters");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimEclipsePropertyFilterCollection::RimEclipsePropertyFilterCollection()
|
||||
{
|
||||
CAF_PDM_InitObject("Property Filters", ":/CellFilter_Values.png", "", "");
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&propertyFilters, "PropertyFilters", "Property Filters", "", "", "");
|
||||
CAF_PDM_InitFieldNoDefault(&propertyFilters, "PropertyFilters", "Property Filters", "", "", "");
|
||||
propertyFilters.uiCapability()->setUiHidden(true);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimEclipsePropertyFilterCollection::~RimEclipsePropertyFilterCollection()
|
||||
{
|
||||
@ -52,7 +51,7 @@ RimEclipsePropertyFilterCollection::~RimEclipsePropertyFilterCollection()
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimEclipseView* RimEclipsePropertyFilterCollection::reservoirView()
|
||||
{
|
||||
@ -63,13 +62,12 @@ RimEclipseView* RimEclipsePropertyFilterCollection::reservoirView()
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipsePropertyFilterCollection::loadAndInitializePropertyFilters()
|
||||
{
|
||||
for (size_t i = 0; i < propertyFilters.size(); i++)
|
||||
for (RimEclipsePropertyFilter* propertyFilter : propertyFilters)
|
||||
{
|
||||
RimEclipsePropertyFilter* propertyFilter = propertyFilters[i];
|
||||
propertyFilter->resultDefinition()->setEclipseCase(reservoirView()->eclipseCase());
|
||||
propertyFilter->initAfterRead();
|
||||
if (isActive() && propertyFilter->isActive())
|
||||
@ -81,7 +79,7 @@ void RimEclipsePropertyFilterCollection::loadAndInitializePropertyFilters()
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipsePropertyFilterCollection::initAfterRead()
|
||||
{
|
||||
@ -89,15 +87,14 @@ void RimEclipsePropertyFilterCollection::initAfterRead()
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimEclipsePropertyFilterCollection::hasActiveFilters() const
|
||||
{
|
||||
if (!isActive) return false;
|
||||
|
||||
for (size_t i = 0; i < propertyFilters.size(); i++)
|
||||
for (RimEclipsePropertyFilter* propertyFilter : propertyFilters)
|
||||
{
|
||||
RimEclipsePropertyFilter* propertyFilter = propertyFilters[i];
|
||||
if (propertyFilter->isActive() && propertyFilter->resultDefinition()->hasResult()) return true;
|
||||
}
|
||||
|
||||
@ -111,36 +108,33 @@ bool RimEclipsePropertyFilterCollection::hasActiveDynamicFilters() const
|
||||
{
|
||||
if (!isActive) return false;
|
||||
|
||||
for (size_t i = 0; i < propertyFilters.size(); i++)
|
||||
for (RimEclipsePropertyFilter* propertyFilter : propertyFilters)
|
||||
{
|
||||
RimEclipsePropertyFilter* propertyFilter = propertyFilters[i];
|
||||
if (propertyFilter->isActive() && propertyFilter->resultDefinition()->hasDynamicResult()) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimEclipsePropertyFilterCollection::isUsingFormationNames() const
|
||||
{
|
||||
if ( !isActive ) return false;
|
||||
if (!isActive) return false;
|
||||
|
||||
for ( size_t i = 0; i < propertyFilters.size(); i++ )
|
||||
for (RimEclipsePropertyFilter* propertyFilter : propertyFilters)
|
||||
{
|
||||
RimEclipsePropertyFilter* propertyFilter = propertyFilters[i];
|
||||
if ( propertyFilter->isActive()
|
||||
&& propertyFilter->resultDefinition()->resultType() == RiaDefines::FORMATION_NAMES
|
||||
&& propertyFilter->resultDefinition()->resultVariable() != RiaDefines::undefinedResultName()) return true;
|
||||
if (propertyFilter->isActive() && propertyFilter->resultDefinition()->resultType() == RiaDefines::FORMATION_NAMES &&
|
||||
propertyFilter->resultDefinition()->resultVariable() != RiaDefines::undefinedResultName())
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipsePropertyFilterCollection::updateIconState()
|
||||
{
|
||||
@ -151,8 +145,7 @@ void RimEclipsePropertyFilterCollection::updateIconState()
|
||||
if (view)
|
||||
{
|
||||
RimViewController* viewController = view->viewController();
|
||||
if (viewController && (viewController->isPropertyFilterOveridden()
|
||||
|| viewController->isVisibleCellsOveridden()))
|
||||
if (viewController && (viewController->isPropertyFilterOveridden() || viewController->isVisibleCellsOveridden()))
|
||||
{
|
||||
activeIcon = false;
|
||||
}
|
||||
@ -165,16 +158,15 @@ void RimEclipsePropertyFilterCollection::updateIconState()
|
||||
|
||||
updateUiIconFromState(activeIcon);
|
||||
|
||||
for (size_t i = 0; i < propertyFilters.size(); i++)
|
||||
for (RimEclipsePropertyFilter* cellFilter : propertyFilters)
|
||||
{
|
||||
RimEclipsePropertyFilter* cellFilter = propertyFilters[i];
|
||||
cellFilter->updateActiveState();
|
||||
cellFilter->updateIconState();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipsePropertyFilterCollection::updateFromCurrentTimeStep()
|
||||
{
|
||||
@ -183,4 +175,3 @@ void RimEclipsePropertyFilterCollection::updateFromCurrentTimeStep()
|
||||
cellFilter->updateFromCurrentTimeStep();
|
||||
}
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user