2012-05-18 02:45:23 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2014-09-23 08:04:57 -05:00
|
|
|
// Copyright (C) 2011- Statoil ASA
|
|
|
|
// Copyright (C) 2013- Ceetron Solutions AS
|
|
|
|
// Copyright (C) 2011-2012 Ceetron AS
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2012-05-18 02:45:23 -05:00
|
|
|
// 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.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2012-05-18 02:45:23 -05:00
|
|
|
// 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.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2012-05-18 02:45:23 -05:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2015-06-25 06:32:00 -05:00
|
|
|
#include "RimEclipseCellColors.h"
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2021-09-20 05:12:51 -05:00
|
|
|
#include "RiaResultNames.h"
|
|
|
|
|
2020-02-28 07:38:24 -06:00
|
|
|
#include "RicfCommandObject.h"
|
2017-01-11 08:03:39 -06:00
|
|
|
#include "RigCaseCellResultsData.h"
|
|
|
|
#include "RigEclipseCaseData.h"
|
|
|
|
#include "RigFlowDiagResults.h"
|
|
|
|
#include "RigFormationNames.h"
|
|
|
|
|
2016-08-03 09:01:44 -05:00
|
|
|
#include "RimCellEdgeColors.h"
|
2017-01-11 08:03:39 -06:00
|
|
|
#include "RimEclipseCase.h"
|
2015-09-23 06:48:25 -05:00
|
|
|
#include "RimEclipseFaultColors.h"
|
2015-05-21 03:34:38 -05:00
|
|
|
#include "RimEclipseView.h"
|
2018-04-18 03:10:39 -05:00
|
|
|
#include "RimRegularLegendConfig.h"
|
2017-10-13 02:29:42 -05:00
|
|
|
#include "RimSimWellInView.h"
|
2017-10-13 07:20:47 -05:00
|
|
|
#include "RimSimWellInViewCollection.h"
|
2014-05-06 15:39:53 -05:00
|
|
|
#include "RimTernaryLegendConfig.h"
|
2015-10-13 03:24:11 -05:00
|
|
|
#include "RimViewController.h"
|
2015-09-23 06:48:25 -05:00
|
|
|
#include "RimViewLinker.h"
|
|
|
|
|
2014-05-06 15:51:17 -05:00
|
|
|
#include "RiuMainWindow.h"
|
2016-08-05 08:06:50 -05:00
|
|
|
|
2016-06-16 08:59:20 -05:00
|
|
|
#include "cafPdmUiTreeOrdering.h"
|
2013-05-06 03:55:00 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
CAF_PDM_SOURCE_INIT( RimEclipseCellColors, "ResultSlot" );
|
2012-05-18 02:45:23 -05:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2012-05-18 02:45:23 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2015-06-25 05:04:46 -05:00
|
|
|
RimEclipseCellColors::RimEclipseCellColors()
|
2020-12-04 06:21:19 -06:00
|
|
|
: legendConfigChanged( this )
|
2012-05-18 02:45:23 -05:00
|
|
|
{
|
2020-03-03 03:43:07 -06:00
|
|
|
CAF_PDM_InitScriptableObjectWithNameAndComment( "Cell Result",
|
|
|
|
":/CellResult.png",
|
|
|
|
"",
|
|
|
|
"",
|
|
|
|
"CellColors",
|
|
|
|
"Eclipse Cell Colors class" );
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2021-11-14 07:15:12 -06:00
|
|
|
CAF_PDM_InitFieldNoDefault( &obsoleteField_legendConfig, "LegendDefinition", "Color Legend" );
|
2019-09-06 03:40:57 -05:00
|
|
|
this->obsoleteField_legendConfig.xmlCapability()->setIOWritable( false );
|
2014-06-13 01:12:45 -05:00
|
|
|
|
2021-11-14 07:15:12 -06:00
|
|
|
CAF_PDM_InitFieldNoDefault( &m_legendConfigData, "ResultVarLegendDefinitionList", "" );
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2021-11-14 07:15:12 -06:00
|
|
|
CAF_PDM_InitFieldNoDefault( &m_ternaryLegendConfig, "TernaryLegendDefinition", "Ternary Color Legend" );
|
2018-09-24 15:26:14 -05:00
|
|
|
this->m_ternaryLegendConfig = new RimTernaryLegendConfig();
|
2015-08-06 01:08:00 -05:00
|
|
|
|
2021-11-14 07:15:12 -06:00
|
|
|
CAF_PDM_InitFieldNoDefault( &m_legendConfigPtrField, "LegendDefinitionPtrField", "Color Legend PtrField" );
|
2015-09-01 06:53:04 -05:00
|
|
|
|
|
|
|
// Make sure we have a created legend for the default/undefined result variable
|
2019-09-06 03:40:57 -05:00
|
|
|
changeLegendConfig( this->resultVariable() );
|
2021-05-03 23:53:43 -05:00
|
|
|
|
|
|
|
m_useDiscreteLogLevels = false;
|
2012-05-18 02:45:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2012-05-18 02:45:23 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2015-06-25 05:04:46 -05:00
|
|
|
RimEclipseCellColors::~RimEclipseCellColors()
|
2012-05-18 02:45:23 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
CVF_ASSERT( obsoleteField_legendConfig() == nullptr );
|
2015-08-07 04:09:05 -05:00
|
|
|
|
|
|
|
m_legendConfigData.deleteAllChildObjects();
|
|
|
|
|
2018-09-24 15:26:14 -05:00
|
|
|
delete m_ternaryLegendConfig();
|
2012-05-18 02:45:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2012-05-18 02:45:23 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
void RimEclipseCellColors::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
|
|
|
const QVariant& oldValue,
|
|
|
|
const QVariant& newValue )
|
2012-05-18 02:45:23 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
RimEclipseResultDefinition::fieldChangedByUi( changedField, oldValue, newValue );
|
2013-08-02 06:04:25 -05:00
|
|
|
|
2020-02-12 04:43:15 -06:00
|
|
|
// Update of legend config must happen after RimEclipseResultDefinition::fieldChangedByUi(), as this function
|
|
|
|
// modifies this->resultVariable()
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( changedField == &m_resultVariableUiField )
|
2012-05-18 02:45:23 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( oldValue != newValue )
|
2012-05-18 02:45:23 -05:00
|
|
|
{
|
2021-02-10 20:01:17 -06:00
|
|
|
changeLegendConfig( this->resultVariableUiName() );
|
2012-05-18 02:45:23 -05:00
|
|
|
}
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
RimEclipseFaultColors* faultColors = dynamic_cast<RimEclipseFaultColors*>( this->parentField()->ownerObject() );
|
|
|
|
if ( faultColors )
|
2015-08-10 07:14:22 -05:00
|
|
|
{
|
2015-08-11 04:12:43 -05:00
|
|
|
faultColors->updateConnectedEditors();
|
2015-08-10 07:14:22 -05:00
|
|
|
}
|
2016-08-03 09:01:44 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
RimCellEdgeColors* cellEdgeColors = dynamic_cast<RimCellEdgeColors*>( this->parentField()->ownerObject() );
|
|
|
|
if ( cellEdgeColors )
|
2016-08-03 09:01:44 -05:00
|
|
|
{
|
|
|
|
cellEdgeColors->updateConnectedEditors();
|
|
|
|
}
|
2012-05-18 02:45:23 -05:00
|
|
|
}
|
|
|
|
|
2019-10-15 07:28:15 -05:00
|
|
|
if ( m_reservoirView ) m_reservoirView->scheduleCreateDisplayModelAndRedraw();
|
2012-05-18 02:45:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2012-05-18 02:45:23 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
void RimEclipseCellColors::changeLegendConfig( QString resultVarNameOfNewLegend )
|
2012-05-18 02:45:23 -05:00
|
|
|
{
|
2021-01-21 05:58:46 -06:00
|
|
|
if ( resultVarNameOfNewLegend != RiaResultNames::ternarySaturationResultName() )
|
2014-05-06 15:39:53 -05:00
|
|
|
{
|
2015-08-06 01:08:00 -05:00
|
|
|
QString legendResultVariable;
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( this->m_legendConfigPtrField() )
|
2015-08-06 01:08:00 -05:00
|
|
|
{
|
|
|
|
legendResultVariable = this->m_legendConfigPtrField()->resultVariableName();
|
|
|
|
}
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( !this->m_legendConfigPtrField() || legendResultVariable != resultVarNameOfNewLegend )
|
2012-05-18 02:45:23 -05:00
|
|
|
{
|
2017-03-06 04:18:57 -06:00
|
|
|
bool found = false;
|
2019-09-06 03:40:57 -05:00
|
|
|
for ( size_t i = 0; i < m_legendConfigData.size(); i++ )
|
2014-05-06 15:39:53 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( m_legendConfigData[i]->resultVariableName() == resultVarNameOfNewLegend )
|
2014-05-06 15:39:53 -05:00
|
|
|
{
|
2015-08-06 01:08:00 -05:00
|
|
|
this->m_legendConfigPtrField = m_legendConfigData[i];
|
2019-09-06 03:40:57 -05:00
|
|
|
found = true;
|
2014-05-06 15:39:53 -05:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( !found )
|
2014-05-06 15:39:53 -05:00
|
|
|
{
|
2021-05-03 23:53:43 -05:00
|
|
|
auto newLegend = createLegendForResult( resultVarNameOfNewLegend,
|
|
|
|
this->m_useDiscreteLogLevels,
|
|
|
|
this->hasCategoryResult() );
|
2020-01-28 08:34:01 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
m_legendConfigData.push_back( newLegend );
|
2015-08-06 01:08:00 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
this->m_legendConfigPtrField = newLegend;
|
2014-05-06 15:39:53 -05:00
|
|
|
}
|
2012-05-18 02:45:23 -05:00
|
|
|
}
|
2015-08-06 01:08:00 -05:00
|
|
|
}
|
2020-12-04 06:21:19 -06:00
|
|
|
|
|
|
|
for ( auto legendConfig : m_legendConfigData )
|
|
|
|
{
|
|
|
|
legendConfig->changed.connect( this, &RimEclipseCellColors::onLegendConfigChanged );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2020-12-07 02:30:09 -06:00
|
|
|
void RimEclipseCellColors::onLegendConfigChanged( const caf::SignalEmitter* emitter, RimLegendConfigChangeType changeType )
|
2020-12-04 06:21:19 -06:00
|
|
|
{
|
2020-12-07 02:30:09 -06:00
|
|
|
legendConfigChanged.send( changeType );
|
2012-05-18 02:45:23 -05:00
|
|
|
}
|
|
|
|
|
2021-02-01 01:09:30 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2021-05-03 23:53:43 -05:00
|
|
|
RimRegularLegendConfig* RimEclipseCellColors::createLegendForResult( const QString& resultName,
|
|
|
|
bool useDiscreteLogLevels,
|
|
|
|
bool isCategoryResult )
|
2021-02-01 01:09:30 -06:00
|
|
|
{
|
2022-01-05 14:44:56 -06:00
|
|
|
auto* newLegend = new RimRegularLegendConfig;
|
|
|
|
newLegend->resultVariableName = resultName;
|
2021-02-01 01:09:30 -06:00
|
|
|
|
2022-01-05 14:44:56 -06:00
|
|
|
newLegend->setDefaultConfigForResultName( resultName, useDiscreteLogLevels, isCategoryResult );
|
2021-02-01 01:09:30 -06:00
|
|
|
|
|
|
|
return newLegend;
|
|
|
|
}
|
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2012-05-18 02:45:23 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2015-06-25 05:04:46 -05:00
|
|
|
void RimEclipseCellColors::initAfterRead()
|
2012-05-18 02:45:23 -05:00
|
|
|
{
|
2015-06-25 02:38:53 -05:00
|
|
|
RimEclipseResultDefinition::initAfterRead();
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( this->m_legendConfigPtrField() && this->m_legendConfigPtrField()->resultVariableName == "" )
|
2012-05-18 02:45:23 -05:00
|
|
|
{
|
2015-08-06 01:08:00 -05:00
|
|
|
this->m_legendConfigPtrField()->resultVariableName = this->resultVariable();
|
|
|
|
}
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( obsoleteField_legendConfig )
|
2015-08-06 01:08:00 -05:00
|
|
|
{
|
|
|
|
// The current legend config is NOT stored in <ResultVarLegendDefinitionList> in ResInsight up to v 1.3.7-dev
|
2018-04-18 03:10:39 -05:00
|
|
|
RimRegularLegendConfig* obsoleteLegend = obsoleteField_legendConfig();
|
2015-08-07 05:40:47 -05:00
|
|
|
|
2018-10-10 03:17:07 -05:00
|
|
|
// set to nullptr before pushing into container
|
2018-02-18 11:56:43 -06:00
|
|
|
obsoleteField_legendConfig = nullptr;
|
2015-08-07 05:40:47 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
m_legendConfigData.push_back( obsoleteLegend );
|
2015-08-07 05:40:47 -05:00
|
|
|
m_legendConfigPtrField = obsoleteLegend;
|
2012-05-18 02:45:23 -05:00
|
|
|
}
|
2014-05-06 15:39:53 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
changeLegendConfig( this->resultVariable() );
|
2015-09-23 06:48:25 -05:00
|
|
|
|
|
|
|
updateIconState();
|
2012-05-18 02:45:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-04-15 04:06:27 -05:00
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
void RimEclipseCellColors::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
2019-04-15 04:06:27 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
RimEclipseResultDefinition::defineUiOrdering( uiConfigName, uiOrdering );
|
2019-04-15 04:06:27 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( uiConfigName == "AddLegendLevels" )
|
2019-04-15 04:06:27 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
legendConfig()->uiOrdering( "NumIntervalsOnly", uiOrdering );
|
2019-04-15 04:06:27 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2016-06-16 08:59:20 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
void RimEclipseCellColors::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/ )
|
2016-06-16 08:59:20 -05:00
|
|
|
{
|
2021-01-21 05:58:46 -06:00
|
|
|
if ( this->resultVariable() == RiaResultNames::ternarySaturationResultName() )
|
2016-08-05 08:06:50 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
uiTreeOrdering.add( m_ternaryLegendConfig() );
|
2016-08-05 08:06:50 -05:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
uiTreeOrdering.add( m_legendConfigPtrField() );
|
2016-08-05 08:06:50 -05:00
|
|
|
}
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
uiTreeOrdering.skipRemainingChildren( true );
|
2016-06-16 08:59:20 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2016-09-07 04:41:02 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
void RimEclipseCellColors::updateLegendCategorySettings()
|
|
|
|
{
|
2021-02-10 20:01:17 -06:00
|
|
|
changeLegendConfig( this->resultVariableUiName() );
|
2016-09-07 04:41:02 -05:00
|
|
|
}
|
|
|
|
|
2019-03-05 05:37:58 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
void RimEclipseCellColors::uiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/ )
|
2019-03-05 05:37:58 -06:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
defineUiTreeOrdering( uiTreeOrdering, uiConfigName );
|
2019-03-05 05:37:58 -06:00
|
|
|
}
|
|
|
|
|
2021-05-03 23:53:43 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
void RimEclipseCellColors::useDiscreteLogLevels( bool enable )
|
|
|
|
{
|
|
|
|
m_useDiscreteLogLevels = true;
|
|
|
|
}
|
|
|
|
|
2016-09-07 04:41:02 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2012-05-18 02:45:23 -05:00
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
void RimEclipseCellColors::setReservoirView( RimEclipseView* ownerReservoirView )
|
2012-05-18 02:45:23 -05:00
|
|
|
{
|
2019-03-13 04:16:46 -05:00
|
|
|
m_reservoirView = ownerReservoirView;
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( ownerReservoirView )
|
2019-03-12 08:31:11 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
this->setEclipseCase( ownerReservoirView->eclipseCase() );
|
2019-03-12 08:31:11 -05:00
|
|
|
}
|
2014-06-13 01:12:45 -05:00
|
|
|
}
|
2016-08-05 08:06:50 -05:00
|
|
|
|
2015-09-01 06:56:35 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2015-09-01 06:56:35 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
RimEclipseView* RimEclipseCellColors::reservoirView()
|
|
|
|
{
|
|
|
|
return m_reservoirView;
|
|
|
|
}
|
|
|
|
|
2017-03-21 09:58:02 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-03-21 09:58:02 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-11-22 05:36:39 -06:00
|
|
|
void RimEclipseCellColors::updateRangesForEmbeddedLegends( int currentTimeStep )
|
2017-03-21 09:58:02 -05:00
|
|
|
{
|
2019-11-22 05:36:39 -06:00
|
|
|
this->updateRangesForExplicitLegends( legendConfig(), m_ternaryLegendConfig(), currentTimeStep );
|
2017-01-11 08:03:39 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-01-11 08:03:39 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
void RimEclipseCellColors::setResultVariable( const QString& val )
|
2014-06-13 01:12:45 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
RimEclipseResultDefinition::setResultVariable( val );
|
2014-06-13 01:12:45 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
this->changeLegendConfig( val );
|
2012-05-18 02:45:23 -05:00
|
|
|
}
|
2014-05-06 15:39:53 -05:00
|
|
|
|
2015-08-06 01:08:00 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2015-08-06 01:08:00 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2018-04-18 03:10:39 -05:00
|
|
|
RimRegularLegendConfig* RimEclipseCellColors::legendConfig()
|
2015-08-06 01:08:00 -05:00
|
|
|
{
|
|
|
|
return m_legendConfigPtrField;
|
|
|
|
}
|
|
|
|
|
2018-09-24 15:26:14 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2018-09-24 15:26:14 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
RimTernaryLegendConfig* RimEclipseCellColors::ternaryLegendConfig()
|
|
|
|
{
|
|
|
|
return m_ternaryLegendConfig;
|
|
|
|
}
|
|
|
|
|
2015-09-23 06:48:25 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2015-09-23 06:48:25 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
void RimEclipseCellColors::updateIconState()
|
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( m_reservoirView )
|
2015-09-23 06:48:25 -05:00
|
|
|
{
|
2019-03-05 05:37:58 -06:00
|
|
|
RimViewController* viewController = m_reservoirView->viewController();
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( viewController && viewController->isResultColorControlled() )
|
2019-03-05 05:37:58 -06:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
updateUiIconFromState( false );
|
2019-03-05 05:37:58 -06:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
updateUiIconFromState( true );
|
2019-03-05 05:37:58 -06:00
|
|
|
}
|
2015-09-23 06:48:25 -05:00
|
|
|
}
|
|
|
|
uiCapability()->updateConnectedEditors();
|
|
|
|
}
|