diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index 32fc8575b3..eb63f9c6f2 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -3335,8 +3335,15 @@ void MainFrame::set_print_button_to_default(PrintSelectType select_type) m_print_enable = get_enable_print_status() && can_send_gcode(); m_print_btn->Enable(m_print_enable); this->Layout(); + } else if (select_type == PrintSelectType::eExportGcode) { + m_print_btn->SetLabel(_L("Export G-code file")); + m_print_select = eExportGcode; + if (m_print_enable) + m_print_enable = get_enable_print_status() && can_send_gcode(); + m_print_btn->Enable(m_print_enable); + this->Layout(); } else { - //unsupport + // unsupport return; } } diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 88e573a817..9077ae78b8 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -1059,8 +1059,8 @@ void Sidebar::update_all_preset_comboboxes() } else { connection_btn->Show(); ams_btn->Hide(); - p_mainframe->set_print_button_to_default(MainFrame::PrintSelectType::eSendGcode); auto cfg = preset_bundle.printers.get_edited_preset().config; + auto print_btn_type = MainFrame::PrintSelectType::eExportGcode; wxString url = cfg.opt_string("print_host_webui").empty() ? cfg.opt_string("print_host") : cfg.opt_string("print_host_webui"); if(!url.empty()) { @@ -1071,7 +1071,10 @@ void Sidebar::update_all_preset_comboboxes() if (cfg.has("printhost_apikey")) apikey = cfg.opt_string("printhost_apikey"); p_mainframe->load_printer_url(url, apikey); + + print_btn_type = MainFrame::PrintSelectType::eSendGcode; } + p_mainframe->set_print_button_to_default(print_btn_type); m_bed_type_list->SelectAndNotify(btPEI-1); m_bed_type_list->Disable();