mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-16 03:07:55 -06:00
ENH:optimize the detection of FTP connection status
Change-Id: I9e7095959f3933e5fa22a0b274d221b1c2c42878
This commit is contained in:
parent
9b59fb4cbc
commit
875c851b61
3 changed files with 26 additions and 25 deletions
|
@ -130,7 +130,6 @@ 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();
|
||||
|
@ -143,22 +142,21 @@ void SendJob::process()
|
|||
m_job_finished = true;
|
||||
return;
|
||||
}
|
||||
else {
|
||||
if (!m_chck_and_continue) {
|
||||
else if(m_is_check_mode && !m_check_and_continue){
|
||||
m_enter_ip_address_fun_success();
|
||||
m_job_finished = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* display info */
|
||||
|
||||
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();
|
||||
|
||||
|
|
|
@ -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<void()> m_success_fun{nullptr};
|
||||
std::function<void()> m_enter_ip_address_fun_fail{nullptr};
|
||||
std::function<void()> 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<void()> success);
|
||||
|
|
|
@ -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; }
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue