Commit 72eaee27 by Christophe Geuzaine

holding shift while pressing a view button will only select that view and hide all the others

parent 91b8ab2f
Pipeline #196 passed with stage
in 9 minutes 27 seconds
......@@ -32,7 +32,14 @@ static void view_toggle_cb(Fl_Widget *w, void *data)
int num = (intptr_t)data;
viewButton *but = FlGui::instance()->onelab->getViewButton(num);
if(but){
opt_view_visible(num, GMSH_SET, but->value());
if(Fl::event_state(FL_SHIFT)){
for(int i = 0; i < PView::list.size(); i++){
if(i != num) opt_view_visible(i, GMSH_SET | GMSH_GUI, 0);
else opt_view_visible(i, GMSH_SET | GMSH_GUI, 1);
}
}
else
opt_view_visible(num, GMSH_SET, but->value());
drawContext::global()->draw();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment