diff --git a/src/slic3r/GUI/GUI_ObjectList.cpp b/src/slic3r/GUI/GUI_ObjectList.cpp index 169c442e8..2b3253ba1 100644 --- a/src/slic3r/GUI/GUI_ObjectList.cpp +++ b/src/slic3r/GUI/GUI_ObjectList.cpp @@ -54,8 +54,11 @@ static PrinterTechnology printer_technology() static const Selection& scene_selection() { - //BBS return current canvas3D return wxGetApp().plater()->get_view3D_canvas3D()->get_selection(); - return wxGetApp().plater()->get_current_canvas3D()->get_selection(); + //BBS AssembleView canvas has its own selection + if (wxGetApp().plater()->get_current_canvas3D()->get_canvas_type() == GLCanvas3D::ECanvasType::CanvasAssembleView) + return wxGetApp().plater()->get_assmeble_canvas3D()->get_selection(); + + return wxGetApp().plater()->get_view3D_canvas3D()->get_selection(); } // Config from current edited printer preset @@ -1292,6 +1295,10 @@ void ObjectList::list_manipulation(const wxPoint& mouse_pos, bool evt_context_me void ObjectList::show_context_menu(const bool evt_context_menu) { + // BBS Disable menu popup if current canvas is Preview + if (wxGetApp().plater()->get_current_canvas3D()->get_canvas_type() == GLCanvas3D::ECanvasType::CanvasPreview) + return; + wxMenu* menu {nullptr}; Plater* plater = wxGetApp().plater(); @@ -4570,12 +4577,15 @@ void ObjectList::update_selections() void ObjectList::update_selections_on_canvas() { - Selection& selection = wxGetApp().plater()->get_current_canvas3D()->get_selection(); + auto canvas_type = wxGetApp().plater()->get_current_canvas3D()->get_canvas_type(); + GLCanvas3D* canvas = canvas_type == GLCanvas3D::ECanvasType::CanvasAssembleView ? wxGetApp().plater()->get_current_canvas3D() : wxGetApp().plater()->get_view3D_canvas3D(); + Selection& selection = canvas->get_selection(); const int sel_cnt = GetSelectedItemsCount(); if (sel_cnt == 0) { selection.remove_all(); - wxGetApp().plater()->get_current_canvas3D()->update_gizmos_on_off_state(); + if (canvas_type != GLCanvas3D::ECanvasType::CanvasPreview) + wxGetApp().plater()->get_current_canvas3D()->update_gizmos_on_off_state(); return; } @@ -4679,7 +4689,8 @@ void ObjectList::update_selections_on_canvas() selection.add_volumes(mode, volume_idxs, single_selection); } - wxGetApp().plater()->get_current_canvas3D()->update_gizmos_on_off_state(); + if (canvas_type != GLCanvas3D::ECanvasType::CanvasPreview) + wxGetApp().plater()->get_current_canvas3D()->update_gizmos_on_off_state(); wxGetApp().plater()->canvas3D()->render(); }