diff --git a/Common/CommandLine.cpp b/Common/CommandLine.cpp index 1d3fece474ef6709a0fb21d77a23c696189625fe..028c7fcd402dffcfdd707d0bfd8668bfd23911d7 100644 --- a/Common/CommandLine.cpp +++ b/Common/CommandLine.cpp @@ -185,6 +185,7 @@ std::vector<std::pair<std::string, std::string> > GetShortcutsUsage(const std::s s.push_back(mp(cc + "r", "Rename project file")); s.push_back(mp(cc + "s", "Save file as")); s.push_back(mp("Shift+" + cc + "c", "Show clipping plane window")); + s.push_back(mp("Shift+" + cc + "h", "Show current options and workspace window")); s.push_back(mp("Shift+" + cc + "j", "Save options as default")); s.push_back(mp("Shift+" + cc + "m", "Show manipulator window")); s.push_back(mp("Shift+" + cc + "n", "Show option window")); diff --git a/Fltk/FlGui.cpp b/Fltk/FlGui.cpp index cb3a1df3985b4d23bf2c1158d39c166c7f441c8e..7b7cdab7272b70592010d1a60407307b75f724d1 100644 --- a/Fltk/FlGui.cpp +++ b/Fltk/FlGui.cpp @@ -779,6 +779,8 @@ void FlGui::resetVisibility() { if(visibility->win->shown()) visibility_cb(NULL, NULL); + if(help->options->shown()) + help_options_cb(NULL, NULL); } openglWindow *FlGui::getCurrentOpenglWindow() diff --git a/Fltk/helpWindow.cpp b/Fltk/helpWindow.cpp index 3031399ab41acc15033834073f64e9b770f9776f..ad118176671efb1addbe861a823dd3e459b88cad 100644 --- a/Fltk/helpWindow.cpp +++ b/Fltk/helpWindow.cpp @@ -245,26 +245,29 @@ void help_options_cb(Fl_Widget *w, void *data) PrintOptions(0, GMSH_FULLRC, diff, help, 0, &s0); PrintParserSymbols(help, s0); + + int top = FlGui::instance()->help->browser->topline(); FlGui::instance()->help->browser->clear(); for(unsigned int i = 0; i < s0.size(); i++){ std::string::size_type sep = s0[i].rfind('\0'); - void *data = 0; + void *d = 0; if(sep != std::string::npos){ std::string tmp = s0[i].substr(sep + 1); - if(tmp == "number") data = (void*)"number"; - else if(tmp == "string") data = (void*)"string"; - else if(tmp == "color") data = (void*)"color"; + if(tmp == "number") d = (void*)"number"; + else if(tmp == "string") d = (void*)"string"; + else if(tmp == "color") d = (void*)"color"; } if(search.empty()){ - FlGui::instance()->help->browser->add(s0[i].c_str(), data); + FlGui::instance()->help->browser->add(s0[i].c_str(), d); } else{ std::string tmp(s0[i]); std::transform(tmp.begin(), tmp.end(), tmp.begin(), ::tolower); if(tmp.find(search) != std::string::npos) - FlGui::instance()->help->browser->add(s0[i].c_str(), data); + FlGui::instance()->help->browser->add(s0[i].c_str(), d); } } + FlGui::instance()->help->browser->topline(top); } helpWindow::helpWindow()