From ca3ee712fef0caa768cd595b1b0b12b11f08ca5b Mon Sep 17 00:00:00 2001 From: YuSanka Date: Fri, 9 Jun 2023 11:20:02 +0200 Subject: [PATCH] Fix for SPE-1747 : Crash[LINUX] or unexpected behavior[OSX and Win] when moving object with Variable layer height --- src/slic3r/GUI/GUI_ObjectList.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/GUI_ObjectList.cpp b/src/slic3r/GUI/GUI_ObjectList.cpp index 1e390f203..501eb0c95 100644 --- a/src/slic3r/GUI/GUI_ObjectList.cpp +++ b/src/slic3r/GUI/GUI_ObjectList.cpp @@ -4382,7 +4382,8 @@ void ObjectList::update_and_show_object_settings_item() const wxDataViewItem item = GetSelection(); if (!item) return; - const wxDataViewItem& obj_item = m_objects_model->IsSettingsItem(item) ? m_objects_model->GetParent(item) : item; + const wxDataViewItem obj_item = m_objects_model->GetTopParent(item); + assert(m_objects_model->GetItemType(obj_item) == ItemType::itObject); select_item([this, obj_item](){ return add_settings_item(obj_item, &get_item_config(obj_item).get()); }); }