diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index ea23f8daaa..411b6aeec2 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -613,7 +613,7 @@ void GUI_App::set_auto_toolbar_icon_scale(float scale) const const float icon_sc = m_em_unit * 0.1f; #endif // __APPLE__ - int int_val = std::min(int(scale / icon_sc * 100), 100); + long int_val = std::min(int(std::lround(scale / icon_sc * 100)), 100); std::string val = std::to_string(int_val); app_config->set("auto_toolbar_size", val); diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 8a489c703b..6b452f1b8c 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -4278,7 +4278,7 @@ void Sidebar::set_btn_label(const ActionButtonType btn_type, const wxString& lab // Plater / Public Plater::Plater(wxWindow *parent, MainFrame *main_frame) - : wxPanel(parent) + : wxPanel(parent, wxID_ANY, wxDefaultPosition, wxSize(76 * wxGetApp().em_unit(), 49 * wxGetApp().em_unit())) , p(new priv(this, main_frame)) { // Initialization performed in the private c-tor diff --git a/src/slic3r/GUI/Search.cpp b/src/slic3r/GUI/Search.cpp index 9fcd9ec9f7..22ac7b70f9 100644 --- a/src/slic3r/GUI/Search.cpp +++ b/src/slic3r/GUI/Search.cpp @@ -460,7 +460,7 @@ SearchDialog::SearchDialog(OptionsSearcher* searcher) check_sizer->Add(new wxStaticText(this, wxID_ANY, _L("Use for search") + ":"), 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, border); check_sizer->Add(check_category, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, border); - if (GUI::wxGetApp().is_localized()) + if (check_english) check_sizer->Add(check_english, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, border); check_sizer->AddStretchSpacer(border); check_sizer->Add(cancel_btn, 0, wxALIGN_CENTER_VERTICAL); @@ -484,7 +484,7 @@ SearchDialog::SearchDialog(OptionsSearcher* searcher) #endif //__WXMSW__ check_category->Bind(wxEVT_CHECKBOX, &SearchDialog::OnCheck, this); - if (GUI::wxGetApp().is_localized()) + if (check_english) check_english ->Bind(wxEVT_CHECKBOX, &SearchDialog::OnCheck, this); Bind(wxEVT_MOTION, &SearchDialog::OnMotion, this); @@ -505,7 +505,8 @@ void SearchDialog::Popup(wxPoint position /*= wxDefaultPosition*/) const OptionViewParameters& params = searcher->view_params; check_category->SetValue(params.category); - check_english->SetValue(params.english); + if (check_english) + check_english->SetValue(params.english); this->SetPosition(position); this->ShowModal(); @@ -594,6 +595,9 @@ void SearchDialog::OnSelect(wxDataViewEvent& event) void SearchDialog::update_list() { + // Under OSX model->Clear invoke wxEVT_DATAVIEW_SELECTION_CHANGED, so + // set prevent_list_events to true already here + prevent_list_events = true; search_list_model->Clear(); const std::vector& filters = searcher->found_options(); @@ -601,7 +605,6 @@ void SearchDialog::update_list() search_list_model->Prepend(item.label); // select first item - prevent_list_events = true; search_list->Select(search_list_model->GetItem(0)); prevent_list_events = false; } @@ -609,7 +612,8 @@ void SearchDialog::update_list() void SearchDialog::OnCheck(wxCommandEvent& event) { OptionViewParameters& params = searcher->view_params; - params.english = check_english->GetValue(); + if (check_english) + params.english = check_english->GetValue(); params.category = check_category->GetValue(); searcher->search();