Show category text in legend

Create empty string for standard legends. Show category text if present.
This commit is contained in:
Magne Sjaastad committed 2023-05-09 15:07:52 +02:00
1 parent f70d2c4949
commit 3208abad19
2 files changed
+17 -3

No files matched your search

@@ -164,10 +164,9 @@ void RimColorLegendCollection::createStandardColorLegends()
for ( size_t i = 0; i < colorArray.size(); i++ )
{
cvf::Color3f color3f( colorArray[i] );
QColor colorQ( colorArray[i].r(), colorArray[i].g(), colorArray[i].b() );
RimColorLegendItem* colorLegendItem = new RimColorLegendItem;
colorLegendItem->setValues( colorQ.name(), static_cast<int>( i ), color3f );
colorLegendItem->setValues( "", static_cast<int>( i ), color3f );
colorLegend->appendColorLegendItem( colorLegendItem );
colorLegend->setReadOnly( true );