From 6124f677aea5442571ae5ba357ad684e1a45cbcb Mon Sep 17 00:00:00 2001 From: YuSanka Date: Thu, 3 Dec 2020 13:24:55 +0100 Subject: [PATCH] Suppressed a check of printer_presets for the containing information about "Print Host upload", when presets ate exported from the amf/3mf --- src/slic3r/GUI/GUI_App.cpp | 5 +++-- src/slic3r/GUI/GUI_App.hpp | 2 +- src/slic3r/GUI/Plater.cpp | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 8c97471b2..2be866ce7 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -1710,11 +1710,12 @@ bool GUI_App::checked_tab(Tab* tab) } // Update UI / Tabs to reflect changes in the currently loaded presets -void GUI_App::load_current_presets() +void GUI_App::load_current_presets(bool check_printer_presets_ /*= true*/) { // check printer_presets for the containing information about "Print Host upload" // and create physical printer from it, if any exists - check_printer_presets(); + if (check_printer_presets_) + check_printer_presets(); PrinterTechnology printer_technology = preset_bundle->printers.get_edited_preset().printer_technology(); this->plater()->set_printer_technology(printer_technology); diff --git a/src/slic3r/GUI/GUI_App.hpp b/src/slic3r/GUI/GUI_App.hpp index 44ef4f493..672904459 100644 --- a/src/slic3r/GUI/GUI_App.hpp +++ b/src/slic3r/GUI/GUI_App.hpp @@ -206,7 +206,7 @@ public: void add_config_menu(wxMenuBar *menu); bool check_unsaved_changes(const wxString &header = wxString()); bool checked_tab(Tab* tab); - void load_current_presets(); + void load_current_presets(bool check_printer_presets = true); wxString current_language_code() const { return m_wxLocale->GetCanonicalName(); } // Translate the language code to a code, for which Prusa Research maintains translations. Defaults to "en_US". diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index ba54702e2..f2bf2d644 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -2363,7 +2363,8 @@ std::vector Plater::priv::load_files(const std::vector& input_ wxGetApp().preset_bundle->load_config_model(filename.string(), std::move(config)); if (printer_technology == ptFFF) CustomGCode::update_custom_gcode_per_print_z_from_config(model.custom_gcode_per_print_z, &wxGetApp().preset_bundle->project_config); - wxGetApp().load_current_presets(); + // For exporting from the amf/3mf we shouldn't check printer_presets for the containing information about "Print Host upload" + wxGetApp().load_current_presets(false); is_project_file = true; } wxGetApp().app_config->update_config_dir(path.parent_path().string());