ENH: preview: refine the logic to switch camera view

when switch between preview and view3D,
if the screen center is on the plate
don't change to the plate view

Change-Id: I16b8815ad9b10a7cea174faa6a16bb9e582a77c3
This commit is contained in:
lane.wei 2022-07-28 19:58:06 +08:00 committed by Lane.Wei
parent 92ad7ff1d0
commit 6a08c2d509
4 changed files with 16 additions and 16 deletions

View file

@ -4482,7 +4482,14 @@ void Plater::priv::set_current_panel(wxPanel* panel, bool no_slice)
preview->get_canvas3d()->render(true);
}
}
this->partplate_list.select_plate_view();
//TODO: turn off this switch currently
/*auto canvas_w = float(preview->get_canvas3d()->get_canvas_size().get_width());
auto canvas_h = float(preview->get_canvas3d()->get_canvas_size().get_height());
Point screen_center(canvas_w/2, canvas_h/2);
auto center_point = preview->get_canvas3d()->_mouse_to_3d(screen_center);
center_point(2) = 0.f;
if (!current_plate->contains(center_point))
this->partplate_list.select_plate_view();*/
// keeps current gcode preview, if any
if (this->m_slice_all) {