diff --git a/src/slic3r/GUI/Jobs/SendJob.cpp b/src/slic3r/GUI/Jobs/SendJob.cpp index 2d656de530..eb3a065dc2 100644 --- a/src/slic3r/GUI/Jobs/SendJob.cpp +++ b/src/slic3r/GUI/Jobs/SendJob.cpp @@ -130,35 +130,33 @@ void SendJob::process() params.use_ssl = m_local_use_ssl; // check access code and ip address - if (m_is_check_mode) { - params.dev_id = m_dev_id; - params.project_name = "verify_job"; - params.filename = job_data._temp_path.string(); - params.connection_type = this->connection_type; + params.dev_id = m_dev_id; + params.project_name = "verify_job"; + params.filename = job_data._temp_path.string(); + params.connection_type = this->connection_type; - result = m_agent->start_send_gcode_to_sdcard(params, nullptr, nullptr); - if (result != 0) { - BOOST_LOG_TRIVIAL(error) << "access code is invalid"; - m_enter_ip_address_fun_fail(); - m_job_finished = true; - return; - } - else { - if (!m_chck_and_continue) { - m_enter_ip_address_fun_success(); - m_job_finished = true; - return; - } - } + result = m_agent->start_send_gcode_to_sdcard(params, nullptr, nullptr); + if (result != 0) { + BOOST_LOG_TRIVIAL(error) << "access code is invalid"; + m_enter_ip_address_fun_fail(); + m_job_finished = true; + return; } - /* display info */ + else if(m_is_check_mode && !m_check_and_continue){ + m_enter_ip_address_fun_success(); + m_job_finished = true; + return; + } + - if (this->connection_type == "lan") { + /* display info */ + msg = _L("Sending gcode file over LAN"); + /* if (this->connection_type == "lan") { msg = _L("Sending gcode file over LAN"); } else { msg = _L("Sending gcode file through cloud service"); - } + }*/ int total_plate_num = m_plater->get_partplate_list().get_plate_count(); diff --git a/src/slic3r/GUI/Jobs/SendJob.hpp b/src/slic3r/GUI/Jobs/SendJob.hpp index 59ef11af76..e35b35bd41 100644 --- a/src/slic3r/GUI/Jobs/SendJob.hpp +++ b/src/slic3r/GUI/Jobs/SendJob.hpp @@ -21,7 +21,7 @@ class SendJob : public PlaterJob bool m_job_finished{ false }; int m_print_job_completed_id = 0; bool m_is_check_mode{false}; - bool m_chck_and_continue{false}; + bool m_check_and_continue{false}; std::function m_success_fun{nullptr}; std::function m_enter_ip_address_fun_fail{nullptr}; std::function m_enter_ip_address_fun_success{nullptr}; @@ -55,7 +55,7 @@ public: wxString get_http_error_msg(unsigned int status, std::string body); void set_check_mode() {m_is_check_mode = true;}; - void check_and_continue() {m_chck_and_continue = true;}; + void check_and_continue() {m_check_and_continue = true;}; bool is_finished() { return m_job_finished; } void process() override; void on_success(std::function success); diff --git a/src/slic3r/GUI/SelectMachine.cpp b/src/slic3r/GUI/SelectMachine.cpp index 320cd0fccb..035180c16e 100644 --- a/src/slic3r/GUI/SelectMachine.cpp +++ b/src/slic3r/GUI/SelectMachine.cpp @@ -751,8 +751,11 @@ void SelectMachinePopup::update_user_devices() } op->Bind(EVT_UNBIND_MACHINE, [this, dev, mobj](wxCommandEvent& e) { dev->set_selected_machine(""); - if (mobj) + if (mobj) { mobj->set_access_code(""); + mobj->set_user_access_code(""); + } + MessageDialog msg_wingow(nullptr, _L("Log out successful."), "", wxAPPLY | wxOK); if (msg_wingow.ShowModal() == wxOK) { return; } });