diff --git a/Fwk/AppFwk/cafVizExtensions/cafOverlayScalarMapperLegend.cpp b/Fwk/AppFwk/cafVizExtensions/cafOverlayScalarMapperLegend.cpp index 3a25a58c8f..c2a305c9ec 100644 --- a/Fwk/AppFwk/cafVizExtensions/cafOverlayScalarMapperLegend.cpp +++ b/Fwk/AppFwk/cafVizExtensions/cafOverlayScalarMapperLegend.cpp @@ -674,7 +674,7 @@ void OverlayScalarMapperLegend::computeLayoutAndExtents(const Vec2i& position, c float maxLegendRightPos = 0; setupTextDrawer(m_textDrawer.p(), &m_Layout, &maxLegendRightPos); - unsigned int contentWidth = static_cast(std::ceil(maxLegendRightPos + m_Layout.margins.x())); + unsigned int contentWidth = static_cast(cvf::Math::ceil(maxLegendRightPos + m_Layout.margins.x())); this->setMinimumWidth(contentWidth); }