diff --git a/Common/Options.cpp b/Common/Options.cpp index dffa891cddfdd95b5c3805071c57b6094ddf31e1..5d96af3a198c99de70e5088cbc2483765fbe751a 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -1,4 +1,4 @@ -// $Id: Options.cpp,v 1.121 2003-11-29 01:38:49 geuzaine Exp $ +// $Id: Options.cpp,v 1.122 2003-12-01 05:56:30 geuzaine Exp $ // // Copyright (C) 1997-2003 C. Geuzaine, J.-F. Remacle // @@ -1599,6 +1599,10 @@ char *opt_view_name(OPT_ARGS_STR) strcpy(v->Name, val); #if defined(HAVE_FLTK) if(WID && num < NB_BUTT_MAX) { + // this is OK even if v->Name is not static or allocated, since + // we reset it correctly in the main GUI routines when the view + // associated with the button changes (i.e., when views are + // removed) WID->m_toggle_butt[num]->label(v->Name); WID->m_toggle_butt[num]->redraw(); } @@ -1630,13 +1634,6 @@ char *opt_view_filename(OPT_ARGS_STR) GET_VIEW(NULL); if(action & GMSH_SET) { strcpy(v->FileName, val); -#if defined(HAVE_FLTK) -#if !((FL_MAJOR_VERSION == 1) && (FL_MINOR_VERSION == 0)) - if(WID && num < NB_BUTT_MAX) { - WID->m_toggle_butt[num]->tooltip(v->FileName); - } -#endif -#endif } return v->FileName; } diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp index a525bd4e339e6d0def341c6ea425f29f4c938cf8..16dd50813881b75ad7f8f6c06662759977e71057 100644 --- a/Fltk/GUI.cpp +++ b/Fltk/GUI.cpp @@ -1,4 +1,4 @@ -// $Id: GUI.cpp,v 1.255 2003-11-29 01:38:49 geuzaine Exp $ +// $Id: GUI.cpp,v 1.256 2003-12-01 05:56:30 geuzaine Exp $ // // Copyright (C) 1997-2003 C. Geuzaine, J.-F. Remacle // @@ -980,6 +980,9 @@ void GUI::set_context(Context_Item * menu_asked, int flag) m_toggle_butt[i]->show(); m_toggle_butt[i]->value(v->Visible); m_toggle_butt[i]->label(v->Name); +#if !((FL_MAJOR_VERSION == 1) && (FL_MINOR_VERSION == 0)) + m_toggle_butt[i]->tooltip(v->FileName); +#endif m_toggle2_butt[i]->show(); m_popup_butt[i]->show(); m_popup2_butt[i]->show();