mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#405) Added [Bar] to legend title when showing SE, ST and POR
This commit is contained in:
parent
276addc713
commit
cd13fc5aee
@ -411,9 +411,21 @@ void RimGeoMechView::updateLegends()
|
|||||||
|
|
||||||
m_viewer->addColorLegendToBottomLeftCorner(cellResult()->legendConfig->legend());
|
m_viewer->addColorLegendToBottomLeftCorner(cellResult()->legendConfig->legend());
|
||||||
|
|
||||||
cellResult()->legendConfig->legend()->setTitle(cvfqt::Utils::toString(
|
cvf::String legendTitle = cvfqt::Utils::toString(
|
||||||
caf::AppEnum<RigFemResultPosEnum>(cellResult->resultPositionType()).uiText() + "\n"
|
caf::AppEnum<RigFemResultPosEnum>(cellResult->resultPositionType()).uiText() + "\n"
|
||||||
+ cellResult->resultFieldUiName() + ", " + cellResult->resultComponentUiName()));
|
+ cellResult->resultFieldUiName());
|
||||||
|
|
||||||
|
if (!cellResult->resultComponentUiName().isEmpty())
|
||||||
|
{
|
||||||
|
legendTitle += ", " + cvfqt::Utils::toString(cellResult->resultComponentUiName());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cellResult->resultFieldName() == "SE" || cellResult->resultFieldName() == "ST" || cellResult->resultFieldName() == "POR-Bar")
|
||||||
|
{
|
||||||
|
legendTitle += " [Bar]";
|
||||||
|
}
|
||||||
|
|
||||||
|
cellResult()->legendConfig->legend()->setTitle(legendTitle);
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user