mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5766 Make it possible to change color of well disks.
This commit is contained in:
committed by
Gaute Lindkvist
parent
e5eb2063be
commit
3f988f2d79
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user