mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-09-28 15:33:16 +08:00
ENH:Modification to Optimization of File Transfer System
jira: [STUDIO-11777] Change-Id: Ica33b4a8177691590c07c3941b738939845d1e55
This commit is contained in:
parent
10fb2bedd0
commit
2100066a4a
@ -767,8 +767,6 @@ void SendToPrinterDialog::on_cancel(wxCloseEvent &event)
|
||||
m_send_job->join();
|
||||
}
|
||||
}
|
||||
|
||||
#if !BBL_RELEASE_TO_PUBLIC
|
||||
if (m_file_sys) {
|
||||
m_file_sys->CancelUploadTask();
|
||||
|
||||
@ -777,7 +775,6 @@ void SendToPrinterDialog::on_cancel(wxCloseEvent &event)
|
||||
m_task_timer.reset();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
m_tcp_try_connect = true;
|
||||
m_tutk_try_connect = false;
|
||||
m_ftp_try_connect = false;
|
||||
@ -824,7 +821,7 @@ void SendToPrinterDialog::on_ok(wxCommandEvent &event)
|
||||
}
|
||||
m_send_job->join();
|
||||
}
|
||||
#if !BBL_RELEASE_TO_PUBLIC
|
||||
|
||||
if (m_file_sys) {
|
||||
m_file_sys->CancelUploadTask();
|
||||
if (m_task_timer && m_task_timer->IsRunning()) {
|
||||
@ -832,7 +829,7 @@ void SendToPrinterDialog::on_ok(wxCommandEvent &event)
|
||||
m_task_timer.reset();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
m_is_canceled = true;
|
||||
wxCommandEvent* event = new wxCommandEvent(EVT_PRINT_JOB_CANCEL);
|
||||
wxQueueEvent(this, event);
|
||||
@ -887,7 +884,7 @@ void SendToPrinterDialog::on_ok(wxCommandEvent &event)
|
||||
fs::path default_output_file_path = boost::filesystem::path(default_output_file.c_str());
|
||||
file_name = default_output_file_path.filename().string();
|
||||
}*/
|
||||
#if !BBL_RELEASE_TO_PUBLIC
|
||||
|
||||
if (!obj_->is_lan_mode_printer() && obj_->is_support_brtc) {
|
||||
update_print_status_msg(wxEmptyString, false, false);
|
||||
if (m_file_sys) {
|
||||
@ -930,7 +927,7 @@ void SendToPrinterDialog::on_ok(wxCommandEvent &event)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
#endif
|
||||
|
||||
m_send_job = std::make_shared<SendJob>(m_status_bar, m_plater, m_printer_last_select);
|
||||
m_send_job->m_dev_ip = obj_->dev_ip;
|
||||
m_send_job->m_access_code = obj_->get_access_code();
|
||||
@ -977,9 +974,8 @@ void SendToPrinterDialog::on_ok(wxCommandEvent &event)
|
||||
} else {
|
||||
m_send_job->start();
|
||||
}
|
||||
#if !BBL_RELEASE_TO_PUBLIC
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
BOOST_LOG_TRIVIAL(info) << "send_job: send print job";
|
||||
}
|
||||
@ -1178,16 +1174,12 @@ void SendToPrinterDialog::on_selection_changed(wxCommandEvent &event)
|
||||
obj->command_request_push_all();
|
||||
if (!dev->get_selected_machine()) {
|
||||
dev->set_selected_machine(m_printer_last_select, true);
|
||||
#if !BBL_RELEASE_TO_PUBLIC
|
||||
if (m_file_sys) m_file_sys.reset();
|
||||
#endif
|
||||
}else if (dev->get_selected_machine()->dev_id != m_printer_last_select) {
|
||||
m_ability_list.clear();
|
||||
//update_storage_list(std::vector<std::string>());
|
||||
dev->set_selected_machine(m_printer_last_select, true);
|
||||
#if !BBL_RELEASE_TO_PUBLIC
|
||||
if (m_file_sys) m_file_sys.reset();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -1267,11 +1259,6 @@ void SendToPrinterDialog::update_show_status()
|
||||
}
|
||||
|
||||
if (!m_is_in_sending_mode) {
|
||||
#if BBL_RELEASE_TO_PUBLIC
|
||||
show_status(PrintDialogStatus::PrintStatusReadingFinished);
|
||||
return;
|
||||
}
|
||||
#else
|
||||
if (!obj_->is_support_brtc || m_ftp_try_connect) {
|
||||
if (m_file_sys) {
|
||||
m_device_select.clear();
|
||||
@ -1430,7 +1417,6 @@ void SendToPrinterDialog::update_show_status()
|
||||
m_file_sys->Start();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
bool SendToPrinterDialog::is_blocking_printing(MachineObject* obj_)
|
||||
@ -1776,14 +1762,11 @@ bool SendToPrinterDialog::Show(bool show)
|
||||
Fit();
|
||||
if (show) { CenterOnParent(); }
|
||||
|
||||
#if !BBL_RELEASE_TO_PUBLIC
|
||||
if (m_file_sys) {
|
||||
m_waiting_enable = false;
|
||||
m_waiting_support = false;
|
||||
show ? m_file_sys->Start() : m_file_sys->Stop();
|
||||
}
|
||||
#endif
|
||||
|
||||
return DPIDialog::Show(show);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user