From 61f02464680cdd5a681485992c31d467493c3b57 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Sun, 4 Jan 2009 12:22:57 +0000 Subject: [PATCH] make active model chooser change visiility (less confusing?) --- Fltk/Main.cpp | 4 +++- Fltk/extraDialogs.cpp | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Fltk/Main.cpp b/Fltk/Main.cpp index e785ffd8f1..ef2362d0e0 100644 --- a/Fltk/Main.cpp +++ b/Fltk/Main.cpp @@ -81,8 +81,10 @@ int main(int argc, char *argv[]) // Open project file and merge all other input files OpenProject(CTX.filename); for(unsigned int i = 1; i < CTX.files.size(); i++){ - if(CTX.files[i] == "-new") + if(CTX.files[i] == "-new"){ + GModel::current()->setVisibility(0); new GModel(); + } else MergeFile(CTX.files[i].c_str()); } diff --git a/Fltk/extraDialogs.cpp b/Fltk/extraDialogs.cpp index 633d261140..84ff012df7 100644 --- a/Fltk/extraDialogs.cpp +++ b/Fltk/extraDialogs.cpp @@ -142,7 +142,11 @@ int perspective_editor() 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); + if(b->value()){ + GModel::current()->setVisibility(0); + GModel::current(b->value() - 1); + GModel::current()->setVisibility(1); + } if(w->window()) w->window()->hide(); CTX.mesh.changed = ENT_ALL; GUI::instance()->resetVisibility(); -- GitLab