From f5ca06e7437c022413b14bd8f63fa3466a1ead0c Mon Sep 17 00:00:00 2001 From: Claudio Sacerdoti Coen Date: Fri, 14 Jan 2011 14:15:00 +0000 Subject: [PATCH] The sequent window now always scroll to the bottom when its content changes. --- matita/matita/matitaMathView.ml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/matita/matita/matitaMathView.ml b/matita/matita/matitaMathView.ml index 455d037b9..723170fa5 100644 --- a/matita/matita/matitaMathView.ml +++ b/matita/matita/matitaMathView.ml @@ -111,16 +111,21 @@ class sequentsViewer ~(notebook:GPack.notebook) ~(cicMathView:cicMathView) () = in let reparent () = scrolledWin <- Some w; - match cicMathView#misc#parent with - | None -> w#add cicMathView#coerce - | Some parent -> - let parent = - match cicMathView#misc#parent with - None -> assert false - | Some p -> GContainer.cast_container p - in - parent#remove cicMathView#coerce; - w#add cicMathView#coerce + (match cicMathView#misc#parent with + | None -> () + | Some parent -> + let parent = + match cicMathView#misc#parent with + None -> assert false + | Some p -> GContainer.cast_container p + in + parent#remove cicMathView#coerce); + w#add cicMathView#coerce; + ignore (w#vadjustment#set_value + (w#vadjustment#upper -. w#vadjustment#page_size)); + ignore (w#vadjustment#connect#changed (fun _ -> + w#vadjustment#set_value + (w#vadjustment#upper -. w#vadjustment#page_size))) in goal2win <- (goal_switch, reparent) :: goal2win; w#coerce -- 2.39.2