Added printfs for code debugging on OSX

This commit is contained in:
YuSanka 2018-09-10 12:17:41 +02:00
parent a59a84f237
commit e914a719f8
3 changed files with 8 additions and 6 deletions

View file

@ -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);
}
}

View file

@ -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();

View file

@ -386,10 +386,6 @@ bool PrusaObjectDataViewModelNode::update_settings_digest(const std::vector<std:
bmp = m_bitmap_cache->insert(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;
}