From e914a719f8b3ffd1c44b1e42f0e0c1267b60fbee Mon Sep 17 00:00:00 2001 From: YuSanka Date: Mon, 10 Sep 2018 12:17:41 +0200 Subject: [PATCH] Added printfs for code debugging on OSX --- xs/src/slic3r/GUI/GUI.cpp | 4 ++-- xs/src/slic3r/GUI/GUI_ObjectParts.cpp | 3 +++ xs/src/slic3r/GUI/wxExtensions.cpp | 7 +++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/xs/src/slic3r/GUI/GUI.cpp b/xs/src/slic3r/GUI/GUI.cpp index 315a4bada..956a0008a 100644 --- a/xs/src/slic3r/GUI/GUI.cpp +++ b/xs/src/slic3r/GUI/GUI.cpp @@ -1232,11 +1232,11 @@ void enable_action_buttons(bool enable) return; // Update background colour for buttons - const wxColour bgrd_color = enable ? wxColour(255, 96, 0) : wxColour(204, 204, 204); +// const wxColour bgrd_color = enable ? wxColour(255, 96, 0) : wxColour(204, 204, 204); for (auto btn : g_buttons) { btn->Enable(enable); - btn->SetBackgroundColour(bgrd_color); +// btn->SetBackgroundColour(bgrd_color); } } diff --git a/xs/src/slic3r/GUI/GUI_ObjectParts.cpp b/xs/src/slic3r/GUI/GUI_ObjectParts.cpp index 867fae64d..ee57b4a0a 100644 --- a/xs/src/slic3r/GUI/GUI_ObjectParts.cpp +++ b/xs/src/slic3r/GUI/GUI_ObjectParts.cpp @@ -1014,9 +1014,12 @@ void get_settings_choice(wxMenu *menu, int id, bool is_part) const auto item = m_objects_ctrl->GetSelection(); if (item) { const auto settings_item = m_objects_model->HasSettings(item); + settings_item ? printf("settings_item exist\n") : printf("settings_item will be created\n"); m_objects_ctrl->Select(settings_item ? settings_item : m_objects_model->AddSettingsChild(item)); +#ifndef __WXOSX__ part_selection_changed(); +#endif //no __WXOSX__ } else update_settings_list(); diff --git a/xs/src/slic3r/GUI/wxExtensions.cpp b/xs/src/slic3r/GUI/wxExtensions.cpp index a67a6b6cd..737833abd 100644 --- a/xs/src/slic3r/GUI/wxExtensions.cpp +++ b/xs/src/slic3r/GUI/wxExtensions.cpp @@ -386,10 +386,6 @@ bool PrusaObjectDataViewModelNode::update_settings_digest(const std::vectorinsert(m_name.ToStdString(), bmps); } m_icon.CopyFromBitmap(*bmp); -#ifdef __WXOSX__ - m_icon.SetHeight(bmp->GetHeight()); - m_icon.SetWidth(bmp->GetWidth()); -#endif // __WXOSX__ return true; } @@ -477,6 +473,9 @@ wxDataViewItem PrusaObjectDataViewModel::AddSettingsChild(const wxDataViewItem & // notify control const wxDataViewItem child((void*)node); ItemAdded(parent_item, child); + + if (child) + printf("SettingsChild is created\n"); return child; }