From 2016f971447acbc21c2b248136fed5490011952d Mon Sep 17 00:00:00 2001 From: "maosheng.wei" Date: Sun, 4 Feb 2024 10:28:25 +0800 Subject: [PATCH] FIX: [6123] create printer for exist printer can not into next page Jira: 6123 Change-Id: I338ac0fde4f69b6f312f20e53851d91339e8156f --- src/slic3r/GUI/CreatePresetsDialog.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/CreatePresetsDialog.cpp b/src/slic3r/GUI/CreatePresetsDialog.cpp index 5a8a3c6cc..0fb233912 100644 --- a/src/slic3r/GUI/CreatePresetsDialog.cpp +++ b/src/slic3r/GUI/CreatePresetsDialog.cpp @@ -2880,6 +2880,8 @@ bool CreatePrinterPresetDialog::data_init() void CreatePrinterPresetDialog::set_current_visible_printer() { + //The entire process of creating a custom printer only needs to be done once + if (m_printer_name_to_preset.size() > 0) return; PresetBundle *preset_bundle = wxGetApp().preset_bundle; const std::deque &printer_presets = preset_bundle->printers.get_presets(); wxArrayString printer_choice; @@ -2887,7 +2889,7 @@ void CreatePrinterPresetDialog::set_current_visible_printer() for (const Preset &printer_preset : printer_presets) { if (printer_preset.is_system || !printer_preset.is_visible) continue; if (preset_bundle->printers.get_preset_base(printer_preset)->name != printer_preset.name) continue; - printer_choice.push_back(wxString::FromUTF8(printer_preset.name)); + printer_choice.push_back(from_u8(printer_preset.name)); m_printer_name_to_preset[printer_preset.name] = std::make_shared(printer_preset); } m_select_printer->Set(printer_choice);