]> matita.cs.unibo.it Git - helm.git/commitdiff
Bug fixed: horizontal scrolling now works correctly when the tab is changed.
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Tue, 6 Mar 2012 16:06:56 +0000 (16:06 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Tue, 6 Mar 2012 16:06:56 +0000 (16:06 +0000)
The patch, however, is costly (everything is re-drawn twice).

matita/matita/matitaMathView.ml

index 13d1a240cea2134e9f76810d148f1fa191e69f1d..e62c9f32cdb77d882296be9750f33fcd51a316f8 100644 (file)
@@ -201,7 +201,10 @@ class sequentsViewer ~(notebook:GPack.notebook) ~(cicMathView:cicMathView) () =
             let w =
              new GBin.scrolled_window
               (Gobject.try_cast p#as_widget "GtkScrolledWindow") in
-            w#hadjustment#set_value 0.0;
+            (* The double change upper/lower is to trigger the emission of
+               changed :-( *)
+            w#hadjustment#set_value w#hadjustment#upper;
+            w#hadjustment#set_value w#hadjustment#lower;
             w#vadjustment#set_value
              (w#vadjustment#upper -. w#vadjustment#page_size));
       with Not_found -> assert false)