diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp index b6d3045570c4c1d10517b16c1bd7d91b1c31e051..e523702b0b92e4e8de7a69d431bb918894d9282e 100644 --- a/Fltk/GUI.cpp +++ b/Fltk/GUI.cpp @@ -1,4 +1,4 @@ -// $Id: GUI.cpp,v 1.342 2004-09-16 19:15:27 geuzaine Exp $ +// $Id: GUI.cpp,v 1.343 2004-09-16 22:24:48 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -823,9 +823,10 @@ void GUI::add_post_plugins(Fl_Menu_Button * button, int iView) GMSH_Plugin *p = (*it).second; if(p->getType() == GMSH_Plugin::GMSH_POST_PLUGIN) { p->getName(name); - std::pair < int, GMSH_Plugin * >*pair = new std::pair < int, GMSH_Plugin * >(iView, p); + std::pair<int, GMSH_Plugin*> *pair = new std::pair < int, GMSH_Plugin * >(iView, p); sprintf(menuname, "Plugins/%s...", name); button->add(menuname, 0, (Fl_Callback *) view_options_plugin_cb, (void *)(pair), 0); + m_pop_plugin.push_back(pair); p->dialogBox = 0; } } @@ -1002,6 +1003,9 @@ void GUI::set_context(Context_Item * menu_asked, int flag) for(unsigned int i = 0; i < m_pop_label.size(); i++) delete [] m_pop_label[i]; m_pop_label.clear(); + for(unsigned int i = 0; i < m_pop_plugin.size(); i++) + delete m_pop_plugin[i]; + m_pop_plugin.clear(); int width = m_window->w(); int right_pop_width = 4 * fontsize + 3; diff --git a/Fltk/GUI.h b/Fltk/GUI.h index 8a6c13e1f21a663e0d370d6031856a1ca40ccba0..e1adce390679dd71fc48c23fb2c8706770b4f202 100644 --- a/Fltk/GUI.h +++ b/Fltk/GUI.h @@ -143,6 +143,7 @@ public: std::vector<Fl_Menu_Button*> m_popup_butt ; std::vector<Fl_Menu_Button*> m_popup2_butt ; std::vector<char*> m_pop_label ; + std::vector<std::pair<int, GMSH_Plugin*>*> m_pop_plugin; // graphic window Fl_Window *g_window ;