mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Allow hiding of category name in color legend item
This commit is contained in:
@@ -250,6 +250,8 @@ void RimCustomVfpPlot::createDefaultColors()
|
||||
}
|
||||
|
||||
m_legendConfig->setColorLegend( m_colorLegend );
|
||||
|
||||
setColorItemCategoryHidden();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -712,6 +714,14 @@ void RimCustomVfpPlot::onLoadDataAndUpdate()
|
||||
m_plotWidget->scheduleReplot();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCustomVfpPlot::initAfterRead()
|
||||
{
|
||||
setColorItemCategoryHidden();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -1127,6 +1137,20 @@ void RimCustomVfpPlot::legendColorsChanged( const caf::SignalEmitter* emitter )
|
||||
onLoadDataAndUpdate();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCustomVfpPlot::setColorItemCategoryHidden()
|
||||
{
|
||||
if ( m_colorLegend )
|
||||
{
|
||||
for ( auto item : m_colorLegend->colorLegendItems() )
|
||||
{
|
||||
item->setCategoryFieldsHidden( true );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user