From 649c1bae7c768d8530ce6e19ccdd75a1552e54de Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Fri, 1 Dec 2006 14:32:29 +0000
Subject: [PATCH] add easy "show all" butt in interactive vis gui

---
 Fltk/Callbacks.cpp | 9 ++++++++-
 Fltk/GUI.cpp       | 5 ++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/Fltk/Callbacks.cpp b/Fltk/Callbacks.cpp
index 9f1b857990..474e3a1b30 100644
--- a/Fltk/Callbacks.cpp
+++ b/Fltk/Callbacks.cpp
@@ -1,4 +1,4 @@
-// $Id: Callbacks.cpp,v 1.490 2006-11-30 13:55:20 geuzaine Exp $
+// $Id: Callbacks.cpp,v 1.491 2006-12-01 14:32:29 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -2184,6 +2184,13 @@ void visibility_interactive_cb(CALLBACK_ARGS)
     what = ENT_VOLUME;
     opt_geometry_volumes(0, GMSH_SET | GMSH_GUI, 1);
   }
+  else if(!strcmp(str, "show_all")){
+    for(int i = 1; i <= 5; i++) // elements, points, lines, surfaces, volumes
+      VisibilityManager::instance()->setVisibilityByNumber(i, -1, true, false);
+    CTX.mesh.changed = ENT_ALL;
+    Draw();  
+    return;
+  }
   else
     return;
 
diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp
index e805f90609..9b5dc557aa 100644
--- a/Fltk/GUI.cpp
+++ b/Fltk/GUI.cpp
@@ -1,4 +1,4 @@
-// $Id: GUI.cpp,v 1.576 2006-11-30 14:10:49 geuzaine Exp $
+// $Id: GUI.cpp,v 1.577 2006-12-01 14:32:29 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -3960,6 +3960,9 @@ void GUI::create_visibility_window()
     butt4->callback(visibility_interactive_cb, (void *)"surfaces");
     Fl_Button *butt5 = new Fl_Button(2*WB, 3 * WB + 7 * BH, IW, BH, "Volumes");
     butt5->callback(visibility_interactive_cb, (void *)"volumes");
+
+    Fl_Button *butt6 = new Fl_Button(3*WB + IW, 3 * WB + 3 * BH, 2 * BH, 5*BH, "Show\nAll");
+    butt6->callback(visibility_interactive_cb, (void *)"show_all");
     
     vis_group[2]->end();
   }
-- 
GitLab