From 3d48190616e756e9c754b70de9ba8304066288ef Mon Sep 17 00:00:00 2001 From: YuSanka Date: Thu, 25 Apr 2019 16:19:50 +0200 Subject: [PATCH] After merge fixing --- src/slic3r/GUI/GUI_ObjectList.cpp | 15 ++++++++------- src/slic3r/GUI/Plater.cpp | 3 ++- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/slic3r/GUI/GUI_ObjectList.cpp b/src/slic3r/GUI/GUI_ObjectList.cpp index ff9bd763e..054f74d70 100644 --- a/src/slic3r/GUI/GUI_ObjectList.cpp +++ b/src/slic3r/GUI/GUI_ObjectList.cpp @@ -1182,8 +1182,8 @@ void ObjectList::append_menu_items_osx(wxMenu* menu) wxMenuItem* ObjectList::append_menu_item_fix_through_netfabb(wxMenu* menu) { -// if (!is_windows10()) -// return; + if (!is_windows10()) + return nullptr; wxMenuItem* menu_item = append_menu_item(menu, wxID_ANY, _(L("Fix through the Netfabb")), "", [this](wxCommandEvent&) { fix_through_netfabb(); }, "", menu); menu->AppendSeparator(); @@ -2735,19 +2735,20 @@ void ObjectList::update_item_error_icon(const int obj_idx, const int vol_idx) co if (get_mesh_errors_count(obj_idx, vol_idx) == 0) { // delete Error_icon if all errors are fixed wxVariant variant; - variant << PrusaDataViewBitmapText(from_u8((*m_objects)[obj_idx]->name), wxNullBitmap); + variant << DataViewBitmapText(from_u8((*m_objects)[obj_idx]->name), wxNullBitmap); m_objects_model->SetValue(variant, item, 0); } } void ObjectList::msw_rescale() { + const int em = wxGetApp().em_unit(); // update min size !!! A width of control shouldn't be a wxDefaultCoord - SetMinSize(wxSize(1, 15 * wxGetApp().em_unit())); + SetMinSize(wxSize(1, 15 * em)); - GetColumn(0)->SetWidth(19 * wxGetApp().em_unit()); - GetColumn(1)->SetWidth(8 * wxGetApp().em_unit()); - GetColumn(2)->SetWidth(int(2 * wxGetApp().em_unit())); + GetColumn(0)->SetWidth(19 * em); + GetColumn(1)->SetWidth( 8 * em); + GetColumn(2)->SetWidth( 2 * em); // rescale all icons, used by ObjectList rescale_icons(); diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 91ae153dd..c221b5066 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -2951,7 +2951,8 @@ bool Plater::priv::init_common_menu(wxMenu* menu, const bool is_part/* = false*/ { q->Bind(wxEVT_UPDATE_UI, [this](wxUpdateUIEvent& evt) { evt.Enable(can_mirror()); }, item_mirror->GetId()); q->Bind(wxEVT_UPDATE_UI, [this](wxUpdateUIEvent& evt) { evt.Enable(can_delete()); }, item_delete->GetId()); - q->Bind(wxEVT_UPDATE_UI, [this](wxUpdateUIEvent& evt) { evt.Enable(can_fix_through_netfabb()); }, item_fix_through_netfabb->GetId()); + if (item_fix_through_netfabb) + q->Bind(wxEVT_UPDATE_UI, [this](wxUpdateUIEvent& evt) { evt.Enable(can_fix_through_netfabb()); }, item_fix_through_netfabb->GetId()); } return true;