From 91f6530acff15893eeb3e1cd56ac9372e56712fa Mon Sep 17 00:00:00 2001 From: YuSanka Date: Tue, 28 Mar 2023 16:41:08 +0200 Subject: [PATCH] ObjectList: Fixed selection, when object part is moving/rotating/scaling and "Sinking" info is appearing/disappearing. + Reverted "patch" commit e65ebccb7f5b3f86c50361bd3bd6cc3ebc97d437 --- src/slic3r/GUI/GUI_ObjectList.cpp | 10 ++++++++++ src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp | 4 ---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/slic3r/GUI/GUI_ObjectList.cpp b/src/slic3r/GUI/GUI_ObjectList.cpp index ad2758f9e..5f8b9a75b 100644 --- a/src/slic3r/GUI/GUI_ObjectList.cpp +++ b/src/slic3r/GUI/GUI_ObjectList.cpp @@ -2939,6 +2939,16 @@ void ObjectList::update_info_items(size_t obj_idx, wxDataViewItemArray* selectio if (obj_idx >= m_objects->size()) return; + wxDataViewItemArray sels; + if (!selections) { + GetSelections(sels); + for (wxDataViewItem item : sels) + if (item.IsOk() && m_objects_model->GetItemType(item) == itVolume) { + selections = &sels; + break; + } + } + const ModelObject* model_object = (*m_objects)[obj_idx]; wxDataViewItem item_obj = m_objects_model->GetItemById(obj_idx); assert(item_obj.IsOk()); diff --git a/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp b/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp index ae3704b52..ec2a74f96 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp @@ -369,10 +369,6 @@ bool GLGizmoEmboss::on_mouse_for_translate(const wxMouseEvent &mouse_event) bool res = on_mouse_surface_drag(mouse_event, camera, m_surface_drag, m_parent, m_raycast_manager, up_limit); bool is_dragging = m_surface_drag.has_value(); - // Check if selection is still active - if (m_volume == nullptr) - return false; - // End with surface dragging? if (was_dragging && !is_dragging) { // Update surface by new position