]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/scrolwin.cpp
check that the version of __sync_sub_and_fetch that returns a value is supported...
[wxWidgets.git] / src / gtk / scrolwin.cpp
index 2f0bea636a90f9437eacede1ec31f74d28f704a1..2808986822679f3dbc5494dee5946738f7497e85 100644 (file)
@@ -108,15 +108,15 @@ void wxScrollHelperNative::DoAdjustScrollbar(GtkRange* range,
         *linesPerPage = 0;
     }
 
         *linesPerPage = 0;
     }
 
-    // ensure that the scroll position is always in valid range
-    if ( *pos > *lines )
-        *pos = *lines;
-
     GtkAdjustment* adj = range->adjustment;
     adj->step_increment = 1;
     adj->page_increment =
     adj->page_size = page_size;
     gtk_range_set_range(range, 0, upper);
     GtkAdjustment* adj = range->adjustment;
     adj->step_increment = 1;
     adj->page_increment =
     adj->page_size = page_size;
     gtk_range_set_range(range, 0, upper);
+
+    // ensure that the scroll position is always in valid range
+    if (*pos > *lines)
+        *pos = *lines;
 }
 
 void wxScrollHelperNative::AdjustScrollbars()
 }
 
 void wxScrollHelperNative::AdjustScrollbars()