forked from AuroraMiddleware/gtk
gtkscale: fix bogus compare func
The GtkScaleMark values are gdouble, a simple a-b compare func would fail for values with the same integer value. This breaks the sorting and causes random marker label placement.
This commit is contained in:
parent
1f023cd2b1
commit
f7d3ca46f7
@ -1529,7 +1529,7 @@ compare_marks (gpointer a, gpointer b)
|
|||||||
|
|
||||||
ma = a; mb = b;
|
ma = a; mb = b;
|
||||||
|
|
||||||
return (gint) (ma->value - mb->value);
|
return (ma->value > mb->value) ? 1 : ((ma->value == mb->value) ? 0 : -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user