diff --git a/resources/icons/overlay/cut_hover.png b/resources/icons/overlay/cut_hover.png new file mode 100644 index 000000000..99dc4cf8d Binary files /dev/null and b/resources/icons/overlay/cut_hover.png differ diff --git a/resources/icons/overlay/cut_off.png b/resources/icons/overlay/cut_off.png new file mode 100644 index 000000000..cd4f130e1 Binary files /dev/null and b/resources/icons/overlay/cut_off.png differ diff --git a/resources/icons/overlay/cut_on.png b/resources/icons/overlay/cut_on.png new file mode 100644 index 000000000..7e78e0e6a Binary files /dev/null and b/resources/icons/overlay/cut_on.png differ diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 8dc221aad..3b3e30235 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -999,10 +999,8 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame) })) , notebook(new wxNotebook(q, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_BOTTOM)) , sidebar(new Sidebar(q)) - // , panel3d(new wxPanel(notebook, wxID_ANY)) - , panel3d(nullptr) - // , canvas3D(GLCanvas3DManager::create_wxglcanvas(panel3d)) - , canvas3D(GLCanvas3DManager::create_wxglcanvas(notebook)) + , panel3d(new wxPanel(notebook, wxID_ANY)) + , canvas3D(GLCanvas3DManager::create_wxglcanvas(panel3d)) #if ENABLE_NEW_MENU_LAYOUT , project_filename(wxEmptyString) #endif // ENABLE_NEW_MENU_LAYOUT @@ -1030,21 +1028,17 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame) _3DScene::add_canvas(canvas3D); _3DScene::allow_multisample(canvas3D, GLCanvas3DManager::can_multisample()); - // XXX: reverting panel3d and panel_gizmo_widgets - // ! cf. on_notebook_changed + auto *panel3dsizer = new wxBoxSizer(wxVERTICAL); + panel3dsizer->Add(canvas3D, 1, wxEXPAND); + auto *panel_gizmo_widgets = new wxPanel(panel3d, wxID_ANY); + panel_gizmo_widgets->SetSizer(new wxBoxSizer(wxVERTICAL)); + panel3dsizer->Add(panel_gizmo_widgets, 0, wxEXPAND); - // auto *panel3dsizer = new wxBoxSizer(wxVERTICAL); - // panel3dsizer->Add(canvas3D, 1, wxEXPAND); - // auto *panel_gizmo_widgets = new wxPanel(panel3d, wxID_ANY); - // panel_gizmo_widgets->SetSizer(new wxBoxSizer(wxVERTICAL)); - // panel3dsizer->Add(panel_gizmo_widgets, 0, wxEXPAND); - - // panel3d->SetSizer(panel3dsizer); - // notebook->AddPage(panel3d, _(L("3D"))); - notebook->AddPage(canvas3D, _(L("3D"))); + panel3d->SetSizer(panel3dsizer); + notebook->AddPage(panel3d, _(L("3D"))); preview = new GUI::Preview(notebook, config, &print, &gcode_preview_data, [this](){ schedule_background_process(); }); - // _3DScene::get_canvas(canvas3D)->set_external_gizmo_widgets_parent(panel_gizmo_widgets); + _3DScene::get_canvas(canvas3D)->set_external_gizmo_widgets_parent(panel_gizmo_widgets); // XXX: If have OpenGL _3DScene::enable_picking(canvas3D, true); @@ -1824,8 +1818,7 @@ void Plater::priv::fix_through_netfabb(const int obj_idx) void Plater::priv::on_notebook_changed(wxBookCtrlEvent&) { const auto current_id = notebook->GetCurrentPage()->GetId(); - // if (current_id == panel3d->GetId()) { - if (current_id == canvas3D->GetId()) { + if (current_id == panel3d->GetId()) { if (_3DScene::is_reload_delayed(canvas3D)) { // Delayed loading of the 3D scene. if (this->printer_technology == ptSLA) {