From fe5814e81f7d0248a101fada0b03ecb039bbb88b Mon Sep 17 00:00:00 2001 From: milk Date: Mon, 19 May 2025 14:55:04 +0800 Subject: [PATCH] ENH:Modify the sending logic to ensure that in public network mode, the fallback route is FTP jira:[none] Change-Id: I88c3f89960dfc9492e305f7cff0692590078f62c --- src/slic3r/GUI/SendToPrinter.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/slic3r/GUI/SendToPrinter.cpp b/src/slic3r/GUI/SendToPrinter.cpp index 2341561c8..85904abfb 100644 --- a/src/slic3r/GUI/SendToPrinter.cpp +++ b/src/slic3r/GUI/SendToPrinter.cpp @@ -893,10 +893,12 @@ void SendToPrinterDialog::on_ok(wxCommandEvent &event) file_name = default_output_file_path.filename().string(); }*/ - if ((!obj_->is_lan_mode_printer() && obj_->is_support_brtc) || m_tcp_try_connect) { + if ( ( (!obj_->is_lan_mode_printer() && obj_->is_support_brtc) || m_tcp_try_connect) && (!m_ftp_try_connect) ) { update_print_status_msg(wxEmptyString, false, false); if (m_file_sys) { PrintPrepareData print_data; + + m_plater->get_print_job_data(&print_data); std::string project_name = m_current_project_name.utf8_string() + ".3mf"; @@ -954,7 +956,7 @@ void SendToPrinterDialog::on_ok(wxCommandEvent &event) m_connect_try_times++; }, m_task_timer->GetId()); - m_task_timer->StartOnce(timeout_period); + m_task_timer->StartOnce(timeout_period); } else { BOOST_LOG_TRIVIAL(error) << "SendToPrinter::send job: The printer media capability set is incorrect."; @@ -1311,7 +1313,7 @@ void SendToPrinterDialog::update_show_status() m_file_sys->Stop(true); m_file_sys.reset(); } - BOOST_LOG_TRIVIAL(info) << "m_ftp_try_connect is " << m_ftp_try_connect; + BOOST_LOG_TRIVIAL(info) << "m_ftp_try_connect is" << m_ftp_try_connect; // add log show_status(PrintDialogStatus::PrintStatusReadingFinished);