#2696 Fix ubuntu build after Legend updates.

* Was missing <cmath> to get std::ceil, but cvf::Math also has ceil, so switch
   to that.
This commit is contained in:
Gaute Lindkvist 2018-04-09 14:19:43 +02:00
parent fee549de35
commit b488d99f81

View File

@ -505,7 +505,7 @@ void CategoryLegend::computeLayoutAndExtents(const Vec2i& position, const Vec2ui
float maxLegendRightPos = 0;
setupTextDrawer(m_textDrawer.p(), &m_Layout, &maxLegendRightPos);
unsigned int contentWidth = static_cast<unsigned int>(std::ceil(maxLegendRightPos + m_Layout.margins.x()));
unsigned int contentWidth = static_cast<unsigned int>(cvf::Math::ceil(maxLegendRightPos + m_Layout.margins.x()));
this->setMinimumWidth(contentWidth);
}