mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2889 Fix crash when few tick marks in legend.
Set legend title before adding to view to make size calculaltion correct first time.
This commit is contained in:
@@ -1087,8 +1087,8 @@ void RimEclipseView::updateLegends()
|
||||
}
|
||||
}
|
||||
|
||||
m_viewer->addColorLegendToBottomLeftCorner(this->cellEdgeResult()->legendConfig()->titledOverlayFrame());
|
||||
this->cellEdgeResult()->legendConfig()->setTitle(QString("Edge Results: \n") + this->cellEdgeResult()->resultVariableUiShortName());
|
||||
m_viewer->addColorLegendToBottomLeftCorner(this->cellEdgeResult()->legendConfig()->titledOverlayFrame());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1128,8 +1128,8 @@ void RimEclipseView::updateMinMaxValuesAndAddLegendToView(QString legendLabel,
|
||||
|
||||
if (resultColors->hasResult() && resultColors->legendConfig()->showLegend())
|
||||
{
|
||||
m_viewer->addColorLegendToBottomLeftCorner(resultColors->legendConfig()->titledOverlayFrame());
|
||||
resultColors->legendConfig()->setTitle(legendLabel + resultColors->resultVariableUiShortName());
|
||||
m_viewer->addColorLegendToBottomLeftCorner(resultColors->legendConfig()->titledOverlayFrame());
|
||||
}
|
||||
|
||||
size_t maxTimeStepCount = cellResultsData->maxTimeStepCount();
|
||||
|
||||
Reference in New Issue
Block a user