From 9c433f8e08df6192d1991b9d2ffb338142392a4c Mon Sep 17 00:00:00 2001 From: YuSanka Date: Mon, 10 Sep 2018 13:59:44 +0200 Subject: [PATCH] Try to fix AddSettingsChild on OSX --- xs/src/slic3r/GUI/GUI_ObjectParts.cpp | 1 + xs/src/slic3r/GUI/wxExtensions.hpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/xs/src/slic3r/GUI/GUI_ObjectParts.cpp b/xs/src/slic3r/GUI/GUI_ObjectParts.cpp index ee57b4a0a..7820eec43 100644 --- a/xs/src/slic3r/GUI/GUI_ObjectParts.cpp +++ b/xs/src/slic3r/GUI/GUI_ObjectParts.cpp @@ -1553,6 +1553,7 @@ void part_selection_changed() wxString object_name = wxEmptyString; if (item) { + printf("item exists\n"); const bool is_settings_item = m_objects_model->IsSettingsItem(item); bool is_part = false; wxString og_name = wxEmptyString; diff --git a/xs/src/slic3r/GUI/wxExtensions.hpp b/xs/src/slic3r/GUI/wxExtensions.hpp index 4236e0915..08c899a19 100644 --- a/xs/src/slic3r/GUI/wxExtensions.hpp +++ b/xs/src/slic3r/GUI/wxExtensions.hpp @@ -240,6 +240,8 @@ public: } void Insert(PrusaObjectDataViewModelNode* child, unsigned int n) { + if (!m_container) + m_container = true; m_children.Insert(child, n); } void Append(PrusaObjectDataViewModelNode* child)