From 32d3d34acd96d46d3d741ee797e074379d6ed558 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Fri, 5 Feb 2016 10:30:13 +0000 Subject: [PATCH] better interaction with text fields (no need to press Enter anymore) --- Fltk/onelabGroup.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Fltk/onelabGroup.cpp b/Fltk/onelabGroup.cpp index 933a124f98..9e5b2ceb6b 100644 --- a/Fltk/onelabGroup.cpp +++ b/Fltk/onelabGroup.cpp @@ -966,7 +966,7 @@ Fl_Widget *onelabGroup::_addParameterWidget(onelab::string &p, int ww, int hh, Fl_Input *but = new Fl_Input(1, 1, ww, hh); but->value(p.getValue().c_str()); but->callback(onelab_string_input_cb, (void*)path); - but->when(FL_WHEN_ENTER_KEY); + but->when(FL_WHEN_RELEASE | FL_WHEN_ENTER_KEY); but->align(FL_ALIGN_RIGHT | FL_ALIGN_CLIP); if(highlight){ but->color(c); @@ -1007,7 +1007,7 @@ Fl_Widget *onelabGroup::_addParameterWidget(onelab::string &p, int ww, int hh, but->menubutton()->copy(&menu[0]); but->value(p.getValue().c_str()); but->callback(onelab_string_input_choice_cb, (void*)path); - but->input()->when(FL_WHEN_ENTER_KEY); + but->input()->when(FL_WHEN_RELEASE | FL_WHEN_ENTER_KEY); but->align(FL_ALIGN_RIGHT | FL_ALIGN_CLIP); if(highlight){ but->input()->color(c); -- GitLab