#5766 Make it possible to change color of well disks.

This commit is contained in:
Kristian Bendiksen
2020-04-06 15:29:40 +02:00
committed by Gaute Lindkvist
parent e5eb2063be
commit 3f988f2d79
5 changed files with 28 additions and 3 deletions

View File

@@ -274,6 +274,8 @@ RimSimWellInViewCollection::RimSimWellInViewCollection()
"",
"" );
CAF_PDM_InitField( &m_wellDiskScaleFactor, "WellDiskScaleFactor", 1.0, "Scale Factor", "", "", "" );
cvf::Color3f defaultWellDiskColor = cvf::Color3::OLIVE;
CAF_PDM_InitField( &wellDiskColor, "WellDiskColor", defaultWellDiskColor, "Well Disk Color", "", "", "" );
CAF_PDM_InitField( &obsoleteField_wellPipeVisibility,
"GlobalWellPipeVisibility",
@@ -487,6 +489,15 @@ void RimSimWellInViewCollection::fieldChangedByUi( const caf::PdmFieldHandle* ch
}
}
if ( &wellDiskColor == changedField )
{
for ( RimSimWellInView* w : wells )
{
w->wellDiskColor = wellDiskColor;
w->updateConnectedEditors();
}
}
if ( m_reservoirView )
{
if ( !m_wellDiskSummaryCase() )
@@ -509,7 +520,8 @@ void RimSimWellInViewCollection::fieldChangedByUi( const caf::PdmFieldHandle* ch
else if ( &m_wellDiskQuantity == changedField || &m_wellDiskPropertyType == changedField ||
&m_wellDiskPropertyConfigType == changedField || &m_wellDiskshowLabelsBackground == changedField ||
&m_wellDiskShowQuantityLabels == changedField || &m_wellDiskSummaryCase == changedField ||
&m_wellDiskScaleFactor == changedField || &m_showWellDisks == changedField )
&m_wellDiskScaleFactor == changedField || &m_showWellDisks == changedField ||
&wellDiskColor == changedField )
{
RimWellDiskConfig wellDiskConfig = getActiveWellDiskConfig();
updateWellDisks( wellDiskConfig );
@@ -783,6 +795,10 @@ void RimSimWellInViewCollection::defineUiOrdering( QString uiConfigName, caf::Pd
wellDiskGroup->add( &m_wellDiskShowQuantityLabels );
wellDiskGroup->add( &m_wellDiskshowLabelsBackground );
wellDiskGroup->add( &m_wellDiskScaleFactor );
if ( m_wellDiskPropertyType() == PROPERTY_TYPE_SINGLE )
{
wellDiskGroup->add( &wellDiskColor );
}
bool isReadOnly = m_showWellDisks().isFalse();
@@ -793,6 +809,7 @@ void RimSimWellInViewCollection::defineUiOrdering( QString uiConfigName, caf::Pd
m_wellDiskShowQuantityLabels.uiCapability()->setUiReadOnly( isReadOnly );
m_wellDiskshowLabelsBackground.uiCapability()->setUiReadOnly( isReadOnly );
m_wellDiskScaleFactor.uiCapability()->setUiReadOnly( isReadOnly );
wellDiskColor.uiCapability()->setUiReadOnly( isReadOnly );
}
RimEclipseResultCase* ownerCase = nullptr;