# # patch "view.ml" # from [8530e1ccdff030237d2f603185d8335450bd0547] # to [2801849193023666f7e63c8acd19fc25b20b6a90] # --- view.ml +++ view.ml @@ -1061,12 +1061,13 @@ v.prefs <- { v.prefs with style = p.style } ; need_redraw := true end ; - if !need_layout || !need_redraw - then Canvas.clear v ; - if !need_layout - then handle_query v (Agraph.get_query (some v.agraph)) - else if !need_redraw - then Canvas.update_graph v + match v.agraph with + | Some g when !need_layout -> + handle_query v (Agraph.get_query g) + | Some g when !need_redraw -> + Canvas.clear v ; + Canvas.update_graph v + | _ -> () let get_ancestors v id = Agraph.get_ancestors (some v.agraph) id