else if (range->scroll_type == GTK_SCROLL_PAGE_FORWARD) command = wxEVT_SCROLL_PAGEDOWN;
double dvalue = adjust->value;
- int value = (int)(dvalue >= 0 ? dvalue - 0.5 : dvalue + 0.5);
+ int value = (int)(dvalue < 0 ? dvalue - 0.5 : dvalue + 0.5);
int orient = wxHORIZONTAL;
if ( (win->GetWindowStyleFlag() & wxSB_VERTICAL) == wxSB_VERTICAL)
// we want to round to the nearest integer, i.e. 0.9 is rounded to 1 and
// -0.9 is rounded to -1
double val = m_adjust->value;
- return (int)(val >= 0 ? val - 0.5 : val + 0.5);
+ return (int)(val < 0 ? val - 0.5 : val + 0.5);
}
void wxSlider::SetValue( int value )