Fixed #6554 by moving setting the title of the Well Connection Factor legend to RimEclipseView::onUpdateLegens().

This commit is contained in:
rubenthoms 2020-09-22 15:27:20 +02:00
parent af06bb1529
commit 73beb0fff9
2 changed files with 7 additions and 13 deletions

View File

@ -1424,6 +1424,7 @@ void RimEclipseView::onUpdateLegends()
updateVirtualConnectionLegendRanges();
RimRegularLegendConfig* virtLegend = m_virtualPerforationResult->legendConfig();
virtLegend->setTitle( m_virtualPerforationResult->uiName() );
nativeOrOverrideViewer()->addColorLegendToBottomLeftCorner( virtLegend->titledOverlayFrame(),
isUsingOverrideViewer() );
}

View File

@ -29,23 +29,16 @@ CAF_PDM_SOURCE_INIT( RimVirtualPerforationResults, "RimVirtualPerforationResults
//--------------------------------------------------------------------------------------------------
RimVirtualPerforationResults::RimVirtualPerforationResults()
{
// clang-format off
CAF_PDM_InitObject( "Well Connection Factors", ":/WellCF16x16.png", "", "" );
QString connectionFactorUiName = "Well Connection Factors";
CAF_PDM_InitField( &m_isActive, "ShowConnectionFactors", false, "", "", "", "" );
CAF_PDM_InitField( &m_showClosedConnections, "ShowClosedConnections", true, "Show On Closed Connections", "", "", "" );
CAF_PDM_InitField( &m_geometryScaleFactor, "GeometryScaleFactor", 2.0, "Geometry Scale Factor", "", "", "" );
CAF_PDM_InitObject(connectionFactorUiName, ":/WellCF16x16.png", "", "");
CAF_PDM_InitField(&m_isActive, "ShowConnectionFactors", false, "", "", "", "");
CAF_PDM_InitField(&m_showClosedConnections, "ShowClosedConnections", true, "Show On Closed Connections", "", "", "");
CAF_PDM_InitField(&m_geometryScaleFactor, "GeometryScaleFactor", 2.0, "Geometry Scale Factor", "", "", "");
CAF_PDM_InitFieldNoDefault(&m_legendConfig, "LegendDefinition", "Color Legend", "", "", "");
m_legendConfig.uiCapability()->setUiHidden(true);
CAF_PDM_InitFieldNoDefault( &m_legendConfig, "LegendDefinition", "Color Legend", "", "", "" );
m_legendConfig.uiCapability()->setUiHidden( true );
m_legendConfig = new RimRegularLegendConfig();
m_legendConfig->setTitle(connectionFactorUiName);
// clang-format on
}
//--------------------------------------------------------------------------------------------------