diff --git a/Common/Options.cpp b/Common/Options.cpp index 4fdaba99975d0086fc07f43029b846fee80e8893..52653acec4bbb43bec633355d3df5ed8ed7e368e 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -1,4 +1,4 @@ -// $Id: Options.cpp,v 1.271 2006-01-11 03:51:16 geuzaine Exp $ +// $Id: Options.cpp,v 1.272 2006-01-18 04:33:51 geuzaine Exp $ // // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // @@ -158,7 +158,7 @@ void Init_Options(int num) #endif CTX.solver.listen = 0; CTX.forced_bbox = 0; - CTX.enable_mouse_selection = 1; + CTX.enable_mouse_selection = 2; // hover-to-show-number and click-to-select } void ReInit_Options(int num) diff --git a/Fltk/Callbacks.cpp b/Fltk/Callbacks.cpp index c25e51261afe28a43d5bb0f141a7128d31ba0140..e424e4529edba185b7c86abce1a7fa159afbf398 100644 --- a/Fltk/Callbacks.cpp +++ b/Fltk/Callbacks.cpp @@ -1,4 +1,4 @@ -// $Id: Callbacks.cpp,v 1.399 2006-01-16 17:55:43 geuzaine Exp $ +// $Id: Callbacks.cpp,v 1.400 2006-01-18 04:33:51 geuzaine Exp $ // // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // @@ -469,14 +469,19 @@ void status_xyz1p_cb(CALLBACK_ARGS) WID->create_message_window(); } else if(!strcmp(str, "S")){ // mouse selection - if(CTX.enable_mouse_selection){ - CTX.enable_mouse_selection = 0; + if(Fl::event_state(FL_SHIFT)){ + CTX.enable_mouse_selection = 1; // mouse click only (no hover) + Msg(STATUS1N, "Mouse hover OFF"); + WID->g_status_butt[9]->color(FL_GREEN); + } + else if(CTX.enable_mouse_selection){ + CTX.enable_mouse_selection = 0; // mouse does nothing Msg(STATUS1N, "Mouse selection OFF"); WID->g_status_butt[9]->color(FL_RED); - WID->g_opengl_window->cursor(FL_CURSOR_DEFAULT, FL_BLACK, FL_WHITE); + WID->g_opengl_window->cursor(FL_CURSOR_DEFAULT, FL_BLACK, FL_WHITE); } else{ - CTX.enable_mouse_selection = 1; + CTX.enable_mouse_selection = 2; // mouse hover and click (default) Msg(STATUS1N, "Mouse selection ON"); WID->g_status_butt[9]->color(FL_BACKGROUND_COLOR); } diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp index 08c6760b1a0e5f7f98bebbf0b5df26a4ebbcf91d..772f2a1e882967564f2138eaf34ba311eb513321 100644 --- a/Fltk/GUI.cpp +++ b/Fltk/GUI.cpp @@ -1,4 +1,4 @@ -// $Id: GUI.cpp,v 1.481 2006-01-14 17:13:14 geuzaine Exp $ +// $Id: GUI.cpp,v 1.482 2006-01-18 04:33:51 geuzaine Exp $ // // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // @@ -507,8 +507,7 @@ int GUI::global_shortcuts(int event) if(event != FL_SHORTCUT) return 0; - if(Fl::test_shortcut(FL_SHIFT + FL_Escape) || - Fl::test_shortcut(FL_CTRL + FL_Escape) || + if(Fl::test_shortcut(FL_CTRL + FL_Escape) || Fl::test_shortcut(FL_META + FL_Escape) || Fl::test_shortcut(FL_ALT + FL_Escape)) { return 1; @@ -576,7 +575,8 @@ int GUI::global_shortcuts(int event) quit_selection = 1; return 0; // trick: do as if we didn't use it } - else if(Fl::test_shortcut(FL_Escape)) { + else if(Fl::test_shortcut(FL_Escape) || + Fl::test_shortcut(FL_SHIFT + FL_Escape)) { if(g_opengl_window->LassoMode){ g_opengl_window->LassoMode = false; redraw_opengl(); diff --git a/Fltk/Opengl_Window.cpp b/Fltk/Opengl_Window.cpp index 6a1ddf231d78257b7f835cc5a955eeb003ebb8f2..ca415cd806f88a22a28047fcefc03a61cf310cea 100644 --- a/Fltk/Opengl_Window.cpp +++ b/Fltk/Opengl_Window.cpp @@ -1,4 +1,4 @@ -// $Id: Opengl_Window.cpp,v 1.58 2006-01-06 00:34:23 geuzaine Exp $ +// $Id: Opengl_Window.cpp,v 1.59 2006-01-18 04:33:52 geuzaine Exp $ // // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // @@ -351,7 +351,7 @@ int Opengl_Window::handle(int event) sprintf(str, "%g", point[2]); WID->context_geometry_input[4]->value(str); redraw(); } - else if(CTX.enable_mouse_selection){ + else if(CTX.enable_mouse_selection > 1){ if(curr.win[0] != prev.win[0] || curr.win[1] != prev.win[1]){ WID->make_opengl_current(); v[0] = NULL; c[0] = NULL; s[0] = NULL;