From 00c566ba5bd6971d84875b26fc2baad4b3e32f0c Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Mon, 5 Jan 2009 06:59:07 +0000
Subject: [PATCH] change graph bbox when changing current model

---
 Common/OS.cpp         | 3 ++-
 Fltk/extraDialogs.cpp | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/Common/OS.cpp b/Common/OS.cpp
index c9a1014835..32777c911e 100644
--- a/Common/OS.cpp
+++ b/Common/OS.cpp
@@ -76,7 +76,8 @@ void GetResources(double *s, long *mem)
 #endif
 }
 
-void CheckResources(){
+void CheckResources()
+{
 #if !defined (WIN32) || defined(__CYGWIN__)
   static struct rlimit r;
 
diff --git a/Fltk/extraDialogs.cpp b/Fltk/extraDialogs.cpp
index 09e372e40d..e41e855f67 100644
--- a/Fltk/extraDialogs.cpp
+++ b/Fltk/extraDialogs.cpp
@@ -19,6 +19,7 @@
 #include "GUI.h"
 #include "dialogWindow.h"
 #include "GmshDefines.h"
+#include "OpenFile.h"
 #include "CreateFile.h"
 #include "Options.h"
 #include "Draw.h"
@@ -144,6 +145,7 @@ static void model_switch_cb(Fl_Widget* w, void *data)
   Fl_Select_Browser *b = (Fl_Select_Browser *)w;
   if(b->value()){
     GModel::current(b->value() - 1);
+    SetBoundingBox();
     for(unsigned int i = 0; i < GModel::list.size(); i++)
       GModel::list[i]->setVisibility(0);
     GModel::current()->setVisibility(1);
-- 
GitLab