mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Pipe generator: Added some asserts.
p4#: 20624
This commit is contained in:
@@ -686,7 +686,14 @@ void OverlayScalarMapperLegend::layoutInfo(OverlayColorLegendLayoutInfo* layout)
|
|||||||
if (m_scalarMapper.isNull()) t = 0;
|
if (m_scalarMapper.isNull()) t = 0;
|
||||||
else t = m_scalarMapper->normalizedValue(m_tickValues[i]);
|
else t = m_scalarMapper->normalizedValue(m_tickValues[i]);
|
||||||
t = Math::clamp(t, 0.0, 1.1);
|
t = Math::clamp(t, 0.0, 1.1);
|
||||||
layout->tickPixelPos->set(i, t*layout->legendRect.height());
|
if (i != numTicks -1)
|
||||||
|
{
|
||||||
|
layout->tickPixelPos->set(i, t*layout->legendRect.height());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
layout->tickPixelPos->set(i, layout->legendRect.height()); // Make sure we get a value at the top even if the scalarmapper range is zero
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user