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

shortcut to freeze coordinate in interactive mode

parent 15ae498b
Branches
Tags
No related merge requests found
......@@ -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"));
......
......@@ -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) ||
......
......@@ -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();
......
......@@ -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);
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment