From ed93db724aa06161ecd92b72ce733c95602f4d25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20St=C3=B8ren?= Date: Fri, 9 Sep 2016 09:58:28 +0200 Subject: [PATCH] #829 Fixed strange category colors in odb intersections --- Fwk/AppFwk/cafVizExtensions/cafCategoryMapper.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Fwk/AppFwk/cafVizExtensions/cafCategoryMapper.cpp b/Fwk/AppFwk/cafVizExtensions/cafCategoryMapper.cpp index 1fa133adc8..b89c5b6df4 100644 --- a/Fwk/AppFwk/cafVizExtensions/cafCategoryMapper.cpp +++ b/Fwk/AppFwk/cafVizExtensions/cafCategoryMapper.cpp @@ -180,11 +180,13 @@ double CategoryMapper::domainValue(double normalizedValue) const int CategoryMapper::categoryIndexForCategory(double domainValue) const { int catIndex = -1; + + int intDomainValue = static_cast(nearbyint(domainValue)); size_t i = 0; while (i < m_categoryValues.size() && catIndex == -1) { - if (m_categoryValues[i] == domainValue) + if (m_categoryValues[i] == intDomainValue) { catIndex = static_cast(i); }