From 7e3d8c3142eebdb23c599c8f10efd1d662560a1b Mon Sep 17 00:00:00 2001 From: YuSanka Date: Mon, 7 Dec 2020 18:39:55 +0100 Subject: [PATCH 1/3] Fixed localization for the name of Infill pattern (hot fix for the b27e18c9705ff5eeea2d9be760b7018de095f613) --- src/slic3r/GUI/ConfigManipulation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slic3r/GUI/ConfigManipulation.cpp b/src/slic3r/GUI/ConfigManipulation.cpp index 5765897b8..185f9aa25 100644 --- a/src/slic3r/GUI/ConfigManipulation.cpp +++ b/src/slic3r/GUI/ConfigManipulation.cpp @@ -196,7 +196,7 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con assert(it_pattern != fill_pattern_def->enum_values.end()); if (it_pattern != fill_pattern_def->enum_values.end()) { wxString msg_text = GUI::format_wxstr(_L("The %1% infill pattern is not supposed to work at 100%% density."), - fill_pattern_def->enum_labels[it_pattern - fill_pattern_def->enum_values.begin()]); + _(fill_pattern_def->enum_labels[it_pattern - fill_pattern_def->enum_values.begin()])); if (is_global_config) msg_text += "\n\n" + _L("Shall I switch to rectilinear fill pattern?"); wxMessageDialog dialog(nullptr, msg_text, _L("Infill"), From acd178291034e0046517ebdadefcfaa6f3ae658b Mon Sep 17 00:00:00 2001 From: YuSanka Date: Mon, 7 Dec 2020 19:04:09 +0100 Subject: [PATCH 2/3] In AboutDialog added "Copy Version Info" button (FR #4990) --- src/slic3r/GUI/AboutDialog.cpp | 12 ++++++++++++ src/slic3r/GUI/AboutDialog.hpp | 2 ++ 2 files changed, 14 insertions(+) diff --git a/src/slic3r/GUI/AboutDialog.cpp b/src/slic3r/GUI/AboutDialog.cpp index 4ded4ec92..e320dedfd 100644 --- a/src/slic3r/GUI/AboutDialog.cpp +++ b/src/slic3r/GUI/AboutDialog.cpp @@ -297,6 +297,11 @@ AboutDialog::AboutDialog() auto copy_rights_btn = new wxButton(this, m_copy_rights_btn_id, _L("Portions copyright")+dots); buttons->Insert(0, copy_rights_btn, 0, wxLEFT, 5); copy_rights_btn->Bind(wxEVT_BUTTON, &AboutDialog::onCopyrightBtn, this); + + m_copy_version_btn_id = NewControlId(); + auto copy_version_btn = new wxButton(this, m_copy_version_btn_id, _L("Copy Version Info")); + buttons->Insert(1, copy_version_btn, 0, wxLEFT, 5); + copy_version_btn->Bind(wxEVT_BUTTON, &AboutDialog::onCopyToClipboard, this); this->SetEscapeId(wxID_CLOSE); this->Bind(wxEVT_BUTTON, &AboutDialog::onCloseDialog, this, wxID_CLOSE); @@ -348,5 +353,12 @@ void AboutDialog::onCopyrightBtn(wxEvent &) dlg.ShowModal(); } +void AboutDialog::onCopyToClipboard(wxEvent&) +{ + wxTheClipboard->Open(); + wxTheClipboard->SetData(new wxTextDataObject(_L("Version") + " " + std::string(SLIC3R_VERSION))); + wxTheClipboard->Close(); +} + } // namespace GUI } // namespace Slic3r diff --git a/src/slic3r/GUI/AboutDialog.hpp b/src/slic3r/GUI/AboutDialog.hpp index f1e26fde4..8774d8ce8 100644 --- a/src/slic3r/GUI/AboutDialog.hpp +++ b/src/slic3r/GUI/AboutDialog.hpp @@ -60,6 +60,7 @@ class AboutDialog : public DPIDialog wxHtmlWindow* m_html; wxStaticBitmap* m_logo; int m_copy_rights_btn_id { wxID_ANY }; + int m_copy_version_btn_id { wxID_ANY }; public: AboutDialog(); @@ -70,6 +71,7 @@ private: void onLinkClicked(wxHtmlLinkEvent &event); void onCloseDialog(wxEvent &); void onCopyrightBtn(wxEvent &); + void onCopyToClipboard(wxEvent&); }; } // namespace GUI From 2a44fbefd670809285ca0d1d6ce1b50e40411fe5 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Mon, 7 Dec 2020 19:36:54 +0100 Subject: [PATCH 3/3] Don't ask about inches if we load project file (3mf or amf). #5006 --- src/slic3r/GUI/Plater.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 2c9463968..f1c129118 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -2399,18 +2399,18 @@ std::vector Plater::priv::load_files(const std::vector& input_ wxGetApp().sidebar().update_ui_from_settings(); }; - if (imperial_units) - convert_from_imperial_units(model); - else if (model.looks_like_imperial_units()) { - wxMessageDialog msg_dlg(q, format_wxstr(_L( - "Some object(s) in file %s looks like saved in inches.\n" - "Should I consider them as a saved in inches and convert them?"), from_path(filename)) + "\n", - _L("The object appears to be saved in inches"), wxICON_WARNING | wxYES | wxNO); - if (msg_dlg.ShowModal() == wxID_YES) + if (!is_project_file) { + if (imperial_units) convert_from_imperial_units(model); - } + else if (model.looks_like_imperial_units()) { + wxMessageDialog msg_dlg(q, format_wxstr(_L( + "Some object(s) in file %s looks like saved in inches.\n" + "Should I consider them as a saved in inches and convert them?"), from_path(filename)) + "\n", + _L("The object appears to be saved in inches"), wxICON_WARNING | wxYES | wxNO); + if (msg_dlg.ShowModal() == wxID_YES) + convert_from_imperial_units(model); + } - if (! is_project_file) { if (model.looks_like_multipart_object()) { wxMessageDialog msg_dlg(q, _L( "This file contains several objects positioned at multiple heights.\n"