diff --git a/src/slic3r/GUI/ReleaseNote.cpp b/src/slic3r/GUI/ReleaseNote.cpp index fa6bab3eb3..068896389a 100644 --- a/src/slic3r/GUI/ReleaseNote.cpp +++ b/src/slic3r/GUI/ReleaseNote.cpp @@ -1736,7 +1736,8 @@ void InputIpAddressDialog::set_machine_obj(MachineObject* obj) auto str_ip = m_input_ip->GetTextCtrl()->GetValue(); auto str_access_code = m_input_access_code->GetTextCtrl()->GetValue(); // ORCA enabling / disabling buttons with conditions enough to change its style - m_button_ok->Enable(isIp(str_ip.ToStdString()) && str_access_code.Length() >= 8); + m_button_ok->Enable(isIp(str_ip.ToStdString()) && + (str_access_code.IsEmpty() || str_access_code.Length() >= 8)); Layout(); Fit(); @@ -1801,6 +1802,8 @@ void InputIpAddressDialog::on_ok(wxMouseEvent& evt) m_trouble_shoot->Hide(); std::string str_ip = m_input_ip->GetTextCtrl()->GetValue().ToStdString(); std::string str_access_code = m_input_access_code->GetTextCtrl()->GetValue().ToStdString(); + if (str_access_code.empty()) + str_access_code = "88888888"; std::string str_name = m_input_printer_name->GetTextCtrl()->GetValue().Strip(wxString::both).ToStdString(); // Serial number should not contain lower case letters, and bambu_network plugin crashes // if user entered the wrong serial number, so we call `Upper()` here. @@ -1835,6 +1838,8 @@ void InputIpAddressDialog::on_send_retry() Fit(); wxString ip = m_input_ip->GetTextCtrl()->GetValue(); wxString str_access_code = m_input_access_code->GetTextCtrl()->GetValue(); + if (str_access_code.IsEmpty()) + str_access_code = "88888888"; // check support function if (!m_obj) return; @@ -2068,7 +2073,7 @@ void InputIpAddressDialog::on_text(wxCommandEvent &evt) } // ORCA enabling / disabling buttons with conditions enough to change its style - bool valid_access_code_length = str_access_code.Length() >= 8; + bool valid_access_code_length = str_access_code.IsEmpty() || str_access_code.Length() >= 8; bool enable_btns = isIp(str_ip.ToStdString()) && valid_access_code_length && invalid_access_code; m_button_manual_setup->Enable(enable_btns); m_button_ok->Enable(enable_btns);