diff --git a/CMakeLists.txt b/CMakeLists.txt index a1ad18e54559b9e0480f912dcde6da326541518c..b1215a6952313e06659b427c24b95799092b0b28 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -95,7 +95,7 @@ opt(WRAP_PYTHON "Enable generation of Python wrappers" OFF) set(GMSH_MAJOR_VERSION 2) set(GMSH_MINOR_VERSION 9) -set(GMSH_PATCH_VERSION 0) +set(GMSH_PATCH_VERSION 1) set(GMSH_EXTRA_VERSION "" CACHE STRING "Gmsh extra version string") set(GMSH_VERSION "${GMSH_MAJOR_VERSION}.${GMSH_MINOR_VERSION}") diff --git a/Fltk/onelabGroup.cpp b/Fltk/onelabGroup.cpp index a7c8514eb57679bd563a607078fc70d6b7f8e468..a170097481b95634e5c54112ec11a93d1dd2897d 100644 --- a/Fltk/onelabGroup.cpp +++ b/Fltk/onelabGroup.cpp @@ -706,10 +706,10 @@ Fl_Widget *onelabGroup::_addParameterWidget(onelab::number &p, int ww, int hh, p.getChoices().size() == p.getValueLabels().size()){ Fl_Choice *but = new Fl_Choice(1, 1, ww, hh); std::vector<Fl_Menu_Item> menu; + std::vector<double> choices = p.getChoices(); std::map<double, std::string> labels(p.getValueLabels()); - for(std::map<double, std::string>::iterator it = labels.begin(); - it != labels.end(); it++){ - char *str = strdup(it->second.c_str()); + for(unsigned int i = 0; i < choices.size(); i++){ + char *str = strdup(labels[choices[i]].c_str()); _treeStrings.push_back(str); Fl_Menu_Item menuItem = {str, 0, 0, 0, 0}; if(highlight) menuItem.labelcolor(c); @@ -718,8 +718,8 @@ Fl_Widget *onelabGroup::_addParameterWidget(onelab::number &p, int ww, int hh, Fl_Menu_Item it = {0}; menu.push_back(it); but->copy(&menu[0]); - for(unsigned int i = 0; i < p.getChoices().size(); i++){ - if(p.getValue() == p.getChoices()[i]){ + for(unsigned int i = 0; i < choices.size(); i++){ + if(p.getValue() == choices[i]){ but->value(i); break; }