X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fmatita%2FmatitaMathView.ml;h=e2eb22d5b8f05371ac9f456597360b35668f2c74;hb=f28480139ee72d092a9405619c3bdf6d4ff155ee;hp=bf0f7f8bdc85a106dec3a3ce5cf769073c685fd0;hpb=5b306342bf9befa57abd870527d6bd92b0a5ba50;p=helm.git diff --git a/helm/matita/matitaMathView.ml b/helm/matita/matitaMathView.ml index bf0f7f8bd..e2eb22d5b 100644 --- a/helm/matita/matitaMathView.ml +++ b/helm/matita/matitaMathView.ml @@ -23,6 +23,8 @@ * http://cs.unibo.it/helm/. *) +(* $Id$ *) + open Printf open GrafiteTypes @@ -154,7 +156,6 @@ type selected_term = class clickableMathView obj = let text_width = 80 in -let dummy_loc = HExtlib.dummy_floc in object (self) inherit GMathViewAux.multi_selection_math_view obj @@ -489,9 +490,11 @@ object (self) (Some (Some unsh_sequent, ids_to_terms, ids_to_hypotheses, ids_to_father_ids, Hashtbl.create 1, None)); - let name = "sequent_viewer.xml" in - HLog.debug ("load_sequent: dumping MathML to ./" ^ name); - ignore (domImpl#saveDocumentToFile ~name ~doc:mathml ()); + if BuildTimeConf.debug then begin + let name = "sequent_viewer.xml" in + HLog.debug ("load_sequent: dumping MathML to ./" ^ name); + ignore (domImpl#saveDocumentToFile ~name ~doc:mathml ()) + end; self#load_root ~root:mathml#get_documentElement method load_object obj = @@ -509,9 +512,11 @@ object (self) XmlDiff.update_dom ~from:current_mathml mathml; self#thaw | _ -> - let name = "cic_browser.xml" in - HLog.debug ("cic_browser: dumping MathML to ./" ^ name); - ignore (domImpl#saveDocumentToFile ~name ~doc:mathml ()); + if BuildTimeConf.debug then begin + let name = "cic_browser.xml" in + HLog.debug ("cic_browser: dumping MathML to ./" ^ name); + ignore (domImpl#saveDocumentToFile ~name ~doc:mathml ()) + end; self#load_root ~root:mathml#get_documentElement; current_mathml <- Some mathml); end @@ -578,7 +583,7 @@ class sequentsViewer ~(notebook:GPack.notebook) ~(cicMathView:cicMathView) () = goal2page <- []; goal2win <- []; _metasenv <- []; - self#script#setGoal ~-1; + self#script#setGoal None method load_sequents { proof = (_,metasenv,_,_) as proof; stack = stack } = _metasenv <- metasenv; @@ -653,7 +658,7 @@ class sequentsViewer ~(notebook:GPack.notebook) ~(cicMathView:cicMathView) () = let goal_switch = try List.assoc page page2goal with Not_found -> assert false in - self#script#setGoal (goal_of_switch goal_switch); + self#script#setGoal (Some (goal_of_switch goal_switch)); self#render_page ~page ~goal_switch)) method private render_page ~page ~goal_switch =