Fix Physical Printers default address of Connect

This commit is contained in:
David Kocik 2024-06-14 14:03:23 +02:00 committed by Lukas Matena
parent 42e222d8db
commit 5c7ba0d879

View File

@ -653,7 +653,7 @@ void PhysicalPrinterDialog::update(bool printer_change)
text_ctrl* printhost_win = printhost_field ? dynamic_cast<text_ctrl*>(printhost_field->getWindow()) : nullptr;
if (!m_opened_as_connect && printhost_win && m_last_host_type != htPrusaConnect){
m_stored_host = printhost_win->GetValue();
printhost_win->SetValue(L"https://dev.connect.prusa3d.com");
printhost_win->SetValue(L"https://connect.prusa3d.com");
}
} else {
m_printhost_browse_btn->Show();
@ -888,10 +888,10 @@ void PhysicalPrinterDialog::OnOK(wxEvent& event)
text_ctrl* printhost_win = printhost_field ? dynamic_cast<text_ctrl*>(printhost_field->getWindow()) : nullptr;
const auto opt = m_config->option<ConfigOptionEnum<PrintHostType>>("host_type");
if (opt->value == htPrusaConnect) {
if (printhost_win && printhost_win->GetValue() != L"https://dev.connect.prusa3d.com"){
InfoDialog msg(this, _L("Warning"), _L("URL of PrusaConnect is different from https://dev.connect.prusa3d.com. Do you want to continue?"), true, wxYES_NO);
if (printhost_win && printhost_win->GetValue() != L"https://connect.prusa3d.com"){
InfoDialog msg(this, _L("Warning"), _L("URL of PrusaConnect is different from https://connect.prusa3d.com. Do you want to continue?"), true, wxYES_NO);
if(msg.ShowModal() != wxID_YES){
printhost_win->SetValue(L"https://dev.connect.prusa3d.com");
printhost_win->SetValue(L"https://connect.prusa3d.com");
return;
}
}