mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#6118 Automatic red, green and blue curve colors for oil, gas and water properties when using area fill
* Also removed green, red and blue from the cycled well log colors to avoid clashes. * Only automatic when area fill is on. * Potential color clashes for the general case with multiple Oil-curves in the same plot.
This commit is contained in:
@@ -73,6 +73,8 @@
|
||||
#include "cafPdmUiTreeSelectionEditor.h"
|
||||
#include "cafUtils.h"
|
||||
|
||||
#include <QRegularExpression>
|
||||
|
||||
namespace caf
|
||||
{
|
||||
template <>
|
||||
@@ -1305,6 +1307,27 @@ void RimEclipseResultDefinition::setResultVariable( const QString& val )
|
||||
m_resultVariableUiField = val;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Return phase type if the current result is known to be of a particular
|
||||
/// fluid phase type. Otherwise the method will return PHASE_NOT_APPLICABLE.
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaDefines::PhaseType RimEclipseResultDefinition::resultPhaseType() const
|
||||
{
|
||||
if ( QRegularExpression( "OIL" ).match( m_resultVariable() ).hasMatch() )
|
||||
{
|
||||
return RiaDefines::PhaseType::OIL_PHASE;
|
||||
}
|
||||
else if ( QRegularExpression( "GAS" ).match( m_resultVariable() ).hasMatch() )
|
||||
{
|
||||
return RiaDefines::PhaseType::GAS_PHASE;
|
||||
}
|
||||
else if ( QRegularExpression( "WAT" ).match( m_resultVariable() ).hasMatch() )
|
||||
{
|
||||
return RiaDefines::PhaseType::WATER_PHASE;
|
||||
}
|
||||
return RiaDefines::PhaseType::PHASE_NOT_APPLICABLE;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user