mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-21 22:13:25 -06:00
#829 Fixed strange category colors in odb intersections
This commit is contained in:
parent
c360040213
commit
ed93db724a
@ -180,11 +180,13 @@ double CategoryMapper::domainValue(double normalizedValue) const
|
|||||||
int CategoryMapper::categoryIndexForCategory(double domainValue) const
|
int CategoryMapper::categoryIndexForCategory(double domainValue) const
|
||||||
{
|
{
|
||||||
int catIndex = -1;
|
int catIndex = -1;
|
||||||
|
|
||||||
|
int intDomainValue = static_cast<int>(nearbyint(domainValue));
|
||||||
|
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
while (i < m_categoryValues.size() && catIndex == -1)
|
while (i < m_categoryValues.size() && catIndex == -1)
|
||||||
{
|
{
|
||||||
if (m_categoryValues[i] == domainValue)
|
if (m_categoryValues[i] == intDomainValue)
|
||||||
{
|
{
|
||||||
catIndex = static_cast<int>(i);
|
catIndex = static_cast<int>(i);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user