FIX: [6123] create printer for exist printer can not into next page
Jira: 6123 Change-Id: I338ac0fde4f69b6f312f20e53851d91339e8156f
This commit is contained in:
parent
dc8602854b
commit
2016f97144
|
@ -2880,6 +2880,8 @@ bool CreatePrinterPresetDialog::data_init()
|
||||||
|
|
||||||
void CreatePrinterPresetDialog::set_current_visible_printer()
|
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;
|
PresetBundle *preset_bundle = wxGetApp().preset_bundle;
|
||||||
const std::deque<Preset> &printer_presets = preset_bundle->printers.get_presets();
|
const std::deque<Preset> &printer_presets = preset_bundle->printers.get_presets();
|
||||||
wxArrayString printer_choice;
|
wxArrayString printer_choice;
|
||||||
|
@ -2887,7 +2889,7 @@ void CreatePrinterPresetDialog::set_current_visible_printer()
|
||||||
for (const Preset &printer_preset : printer_presets) {
|
for (const Preset &printer_preset : printer_presets) {
|
||||||
if (printer_preset.is_system || !printer_preset.is_visible) continue;
|
if (printer_preset.is_system || !printer_preset.is_visible) continue;
|
||||||
if (preset_bundle->printers.get_preset_base(printer_preset)->name != printer_preset.name) 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<Preset>(printer_preset);
|
m_printer_name_to_preset[printer_preset.name] = std::make_shared<Preset>(printer_preset);
|
||||||
}
|
}
|
||||||
m_select_printer->Set(printer_choice);
|
m_select_printer->Set(printer_choice);
|
||||||
|
|
Loading…
Reference in New Issue