Skip to content
Snippets Groups Projects
Commit 13509ef9 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

refresh options/workspace window automatically

parent 8b05e840
No related branches found
No related tags found
No related merge requests found
...@@ -185,6 +185,7 @@ std::vector<std::pair<std::string, std::string> > GetShortcutsUsage(const std::s ...@@ -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 + "r", "Rename project file"));
s.push_back(mp(cc + "s", "Save file as")); 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 + "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 + "j", "Save options as default"));
s.push_back(mp("Shift+" + cc + "m", "Show manipulator window")); s.push_back(mp("Shift+" + cc + "m", "Show manipulator window"));
s.push_back(mp("Shift+" + cc + "n", "Show option window")); s.push_back(mp("Shift+" + cc + "n", "Show option window"));
... ...
......
...@@ -779,6 +779,8 @@ void FlGui::resetVisibility() ...@@ -779,6 +779,8 @@ void FlGui::resetVisibility()
{ {
if(visibility->win->shown()) if(visibility->win->shown())
visibility_cb(NULL, NULL); visibility_cb(NULL, NULL);
if(help->options->shown())
help_options_cb(NULL, NULL);
} }
openglWindow *FlGui::getCurrentOpenglWindow() openglWindow *FlGui::getCurrentOpenglWindow()
... ...
......
...@@ -245,26 +245,29 @@ void help_options_cb(Fl_Widget *w, void *data) ...@@ -245,26 +245,29 @@ void help_options_cb(Fl_Widget *w, void *data)
PrintOptions(0, GMSH_FULLRC, diff, help, 0, &s0); PrintOptions(0, GMSH_FULLRC, diff, help, 0, &s0);
PrintParserSymbols(help, s0); PrintParserSymbols(help, s0);
int top = FlGui::instance()->help->browser->topline();
FlGui::instance()->help->browser->clear(); FlGui::instance()->help->browser->clear();
for(unsigned int i = 0; i < s0.size(); i++){ for(unsigned int i = 0; i < s0.size(); i++){
std::string::size_type sep = s0[i].rfind('\0'); std::string::size_type sep = s0[i].rfind('\0');
void *data = 0; void *d = 0;
if(sep != std::string::npos){ if(sep != std::string::npos){
std::string tmp = s0[i].substr(sep + 1); std::string tmp = s0[i].substr(sep + 1);
if(tmp == "number") data = (void*)"number"; if(tmp == "number") d = (void*)"number";
else if(tmp == "string") data = (void*)"string"; else if(tmp == "string") d = (void*)"string";
else if(tmp == "color") data = (void*)"color"; else if(tmp == "color") d = (void*)"color";
} }
if(search.empty()){ if(search.empty()){
FlGui::instance()->help->browser->add(s0[i].c_str(), data); FlGui::instance()->help->browser->add(s0[i].c_str(), d);
} }
else{ else{
std::string tmp(s0[i]); std::string tmp(s0[i]);
std::transform(tmp.begin(), tmp.end(), tmp.begin(), ::tolower); std::transform(tmp.begin(), tmp.end(), tmp.begin(), ::tolower);
if(tmp.find(search) != std::string::npos) 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() helpWindow::helpWindow()
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment