From b319e4491aaaa5b7d79387308685e3dcf7639556 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Fri, 4 May 2007 18:27:53 +0000 Subject: [PATCH] add shortcut to draw outines --- Fltk/Callbacks.cpp | 3 ++- Fltk/GUI.cpp | 11 ++++++++++- doc/texinfo/shortcuts.texi | 2 ++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Fltk/Callbacks.cpp b/Fltk/Callbacks.cpp index 52b299630b..5c66f87f78 100644 --- a/Fltk/Callbacks.cpp +++ b/Fltk/Callbacks.cpp @@ -1,4 +1,4 @@ -// $Id: Callbacks.cpp,v 1.527 2007-05-04 16:22:37 geuzaine Exp $ +// $Id: Callbacks.cpp,v 1.528 2007-05-04 18:27:53 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -2473,6 +2473,7 @@ void help_short_cb(CALLBACK_ARGS) Msg(DIRECT, " Alt+a Loop through axes modes"); Msg(DIRECT, " Alt+b Hide/show bounding boxes"); Msg(DIRECT, " Alt+c Loop through predefined color schemes"); + Msg(DIRECT, " Alt+e Hide/Show element outlines for visible post-processing views"); Msg(DIRECT, " Alt+f Change redraw mode (fast/full)"); Msg(DIRECT, " Alt+h Hide/show all post-processing views"); Msg(DIRECT, " Alt+i Hide/show all post-processing view scales"); diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp index f783986000..d906cd0a07 100644 --- a/Fltk/GUI.cpp +++ b/Fltk/GUI.cpp @@ -1,4 +1,4 @@ -// $Id: GUI.cpp,v 1.611 2007-05-04 18:19:22 geuzaine Exp $ +// $Id: GUI.cpp,v 1.612 2007-05-04 18:27:53 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -770,6 +770,14 @@ int GUI::global_shortcuts(int event) redraw_opengl(); return 1; } + else if(Fl::test_shortcut(FL_ALT + 'e')) { + for(i = 0; i < List_Nbr(CTX.post.list); i++) + if(opt_view_visible(i, GMSH_GET, 0)) + opt_view_show_element(i, GMSH_SET | GMSH_GUI, + !opt_view_show_element(i, GMSH_GET, 0)); + redraw_opengl(); + return 1; + } else if(Fl::test_shortcut(FL_ALT + 'h')) { static int show = 0; for(i = 0; i < List_Nbr(CTX.post.list); i++) @@ -2940,6 +2948,7 @@ void GUI::create_option_window() view_butt[5]->callback(view_options_ok_cb); view_butt[10] = new Fl_Check_Button(L + 2 * WB, 2 * WB + 4 * BH, BW, BH, "Draw element outlines"); + view_butt[10]->tooltip("(Alt+e)"); view_butt[10]->type(FL_TOGGLE_BUTTON); view_butt[10]->callback(view_options_ok_cb); diff --git a/doc/texinfo/shortcuts.texi b/doc/texinfo/shortcuts.texi index 74872a39a6..b237cb1e22 100644 --- a/doc/texinfo/shortcuts.texi +++ b/doc/texinfo/shortcuts.texi @@ -98,6 +98,8 @@ Loop through axes modes Hide/show bounding boxes @item Alt+c Loop through predefined color schemes +@item Alt+e +Hide/Show element outlines for visible post-processing views @item Alt+f Change redraw mode (fast/full) @item Alt+h -- GitLab