diff --git a/Common/CommandLine.cpp b/Common/CommandLine.cpp index 41a642b8c5106c27643ce6982e86fc41000ed81f..dc0860e0f4478a51db5ad458b0d188f4e896487a 100644 --- a/Common/CommandLine.cpp +++ b/Common/CommandLine.cpp @@ -177,10 +177,15 @@ std::vector<std::pair<std::string, std::string> > GetShortcutsUsage(const std::s s.push_back(mp("2 or F2", "Mesh surfaces")); s.push_back(mp("3 or F3", "Mesh volumes")); s.push_back(mp("Escape", "Cancel lasso zoom/selection, toggle mouse selection ON/OFF")); + s.push_back(mp("e", "End/accept selection in geometry creation mode")); s.push_back(mp("g", "Go to geometry module")); s.push_back(mp("m", "Go to mesh module")); s.push_back(mp("p", "Go to post-processing module")); + s.push_back(mp("q", "Abort selection in geometry creation mode")); s.push_back(mp("s", "Go to solver module")); + s.push_back(mp("x", "Freeze x coordinate in geometry creation mode")); + s.push_back(mp("y", "Freeze y coordinate in geometry creation mode")); + s.push_back(mp("z", "Freeze z coordinate in geometry creation mode")); s.push_back(mp("Shift+a", "Bring all windows to front")); s.push_back(mp("Shift+g", "Show geometry options")); s.push_back(mp("Shift+m", "Show mesh options")); diff --git a/Fltk/FlGui.cpp b/Fltk/FlGui.cpp index af29878e4eb9598757bf22ca194c2af8b7bc8da5..7958e9c7d5ed99135c488ae4ab71fd422d170dc8 100644 --- a/Fltk/FlGui.cpp +++ b/Fltk/FlGui.cpp @@ -629,6 +629,18 @@ int FlGui::testGlobalShortcuts(int event) graph[i]->gl[j]->invertSelection = 1; status = 0; // trick: do as if we didn't use it } + else if(Fl::test_shortcut('x')) { + elementaryContext->butt[0]->value(!elementaryContext->butt[0]->value()); + status = 1; // trick: do as if we didn't use it + } + else if(Fl::test_shortcut('y')) { + elementaryContext->butt[1]->value(!elementaryContext->butt[1]->value()); + status = 1; // trick: do as if we didn't use it + } + else if(Fl::test_shortcut('z')) { + elementaryContext->butt[2]->value(!elementaryContext->butt[2]->value()); + status = 1; // trick: do as if we didn't use it + } else if(Fl::test_shortcut(FL_Escape) || Fl::test_shortcut(FL_META + FL_Escape) || Fl::test_shortcut(FL_SHIFT + FL_Escape) || diff --git a/Fltk/contextWindow.cpp b/Fltk/contextWindow.cpp index 50798e6d703be86cfdb3bfd0f5f96d4f5da2beba..29ce7a5b150ef22831c26278e255de7c4075780c 100644 --- a/Fltk/contextWindow.cpp +++ b/Fltk/contextWindow.cpp @@ -910,8 +910,11 @@ elementaryContextWindow::elementaryContextWindow(int deltaFontSize) value[i]->callback(elementary_snap_cb); } butt[0] = new Fl_Check_Button(width - 6 * BH, height - WB - BH, 1.2 * BH, BH, "X"); + butt[0]->tooltip("(x)"); butt[1] = new Fl_Check_Button(width - 6 * BH + 1.2 * BH, height - WB - BH, 1.2*BH, BH, "Y"); + butt[1]->tooltip("(y)"); butt[2] = new Fl_Check_Button(width - 6 * BH + 2.4 * BH, height - WB - BH, (6 - 2*1.2) * BH - WB, BH, "Z freeze"); + butt[2]->tooltip("(z)"); } tab1->show(); diff --git a/Fltk/graphicWindow.cpp b/Fltk/graphicWindow.cpp index cdcffc4f87429a0e8f89a3bf2773670e3c729e2b..97c6f22b900651164e13bfe5287cb0ff2f523340 100644 --- a/Fltk/graphicWindow.cpp +++ b/Fltk/graphicWindow.cpp @@ -2759,10 +2759,8 @@ void quick_access_cb(Fl_Widget *w, void *data) status_xyz1p_cb(0, (void *)"z"); } else if(what == "axes"){ - opt_general_axes(0, GMSH_SET|GMSH_GUI, !opt_general_axes(0, GMSH_GET, 0)); - for(unsigned int i = 0; i < PView::list.size(); i++) - if(opt_view_visible(i, GMSH_GET, 0)) - opt_view_axes(i, GMSH_SET | GMSH_GUI, !opt_view_axes(i, GMSH_GET, 0)); + opt_general_axes(0, GMSH_SET|GMSH_GUI, + opt_general_axes(0, GMSH_GET, 0) ? 0 : 3); } else if(what == "orthographic") opt_general_orthographic(0, GMSH_SET | GMSH_GUI, 1); diff --git a/doc/texinfo/shortcuts.texi b/doc/texinfo/shortcuts.texi index e6e202e85e415f751ca2ff0c5b69af95c71db99f..151e945e4ebb13a393d12ea2bebbd4baaef1c163 100644 --- a/doc/texinfo/shortcuts.texi +++ b/doc/texinfo/shortcuts.texi @@ -24,14 +24,24 @@ Mesh surfaces Mesh volumes @item Escape Cancel lasso zoom/selection, toggle mouse selection ON/OFF +@item e +End/accept selection in geometry creation mode @item g Go to geometry module @item m Go to mesh module @item p Go to post-processing module +@item q +Abort selection in geometry creation mode @item s Go to solver module +@item x +Freeze x coordinate in geometry creation mode +@item y +Freeze y coordinate in geometry creation mode +@item z +Freeze z coordinate in geometry creation mode @item Shift+a Bring all windows to front @item Shift+g