#2727 Legends : Add RimLegendConfig as base for Regular and Ternary

This commit is contained in:
Magne Sjaastad
2018-04-18 10:32:51 +02:00
parent 3bc85ce794
commit 71b7bd21f9
15 changed files with 215 additions and 51 deletions

View File

@@ -675,6 +675,36 @@ bool RimRegularLegendConfig::showLegend() const
return m_showLegend;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
caf::TitledOverlayFrame* RimRegularLegendConfig::titledOverlayFrame()
{
if (m_currentScalarMapper == m_categoryMapper)
{
return m_categoryLegend.p();
}
else
{
return m_scalarMapperLegend.p();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const caf::TitledOverlayFrame* RimRegularLegendConfig::titledOverlayFrame() const
{
if (m_currentScalarMapper == m_categoryMapper)
{
return m_categoryLegend.p();
}
else
{
return m_scalarMapperLegend.p();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------