mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-01 23:32:10 +00:00
Removed pop-up error dialog. Resolved improper preset location
This commit is contained in:
@@ -4883,31 +4883,19 @@ void GUI_App::on_http_error(wxCommandEvent &evt)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool m_is_error_shown = false;
|
|
||||||
// Show general error notification for Orca Cloud API failures (not Bambu)
|
|
||||||
if (provider == ORCA_CLOUD_PROVIDER && status >= 400 && code != HttpErrorVersionLimited) {
|
if (provider == ORCA_CLOUD_PROVIDER && status >= 400 && code != HttpErrorVersionLimited) {
|
||||||
wxString msg;
|
if (wxGetApp().plater() != nullptr && wxGetApp().imgui()->display_initialized()) {
|
||||||
if (!error.empty()) {
|
wxString msg;
|
||||||
msg = wxString::Format(_L("Failed to connect to OrcaCloud.\nPlease check your network connectivity\n(HTTP %u): %s"), status, wxString::FromUTF8(error));
|
if (!error.empty()) {
|
||||||
} else {
|
msg = wxString::Format(_L("Failed to connect to OrcaCloud.\nPlease check your network connectivity\n(HTTP %u): %s"), status, wxString::FromUTF8(error));
|
||||||
msg = wxString::Format(_L("Failed to connect to OrcaCloud.\nPlease check your network connectivity\n(HTTP %u)"), status);
|
} else {
|
||||||
}
|
msg = wxString::Format(_L("Failed to connect to OrcaCloud.\nPlease check your network connectivity\n(HTTP %u)"), status);
|
||||||
|
|
||||||
if (app_config->get_bool("developer_mode")) {
|
|
||||||
// Use notification manager if ImGui is ready; fall back to wxMessageBox on Linux
|
|
||||||
// where ImGui may not be initialized until the user switches to the Prepare tab.
|
|
||||||
if (wxGetApp().plater() != nullptr && wxGetApp().imgui()->display_initialized()) {
|
|
||||||
wxGetApp()
|
|
||||||
.plater()
|
|
||||||
->get_notification_manager()
|
|
||||||
->push_notification(NotificationType::PlaterError, NotificationManager::NotificationLevel::WarningNotificationLevel,
|
|
||||||
msg.ToUTF8().data());
|
|
||||||
}
|
}
|
||||||
}
|
wxGetApp()
|
||||||
|
.plater()
|
||||||
if (!m_is_error_shown) {
|
->get_notification_manager()
|
||||||
m_is_error_shown = true;
|
->push_notification(NotificationType::PlaterError, NotificationManager::NotificationLevel::WarningNotificationLevel,
|
||||||
wxMessageBox(msg, _L("Cloud Error"), wxOK | wxICON_ERROR, wxGetApp().mainframe);
|
msg.ToUTF8().data());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -500,14 +500,10 @@ int OrcaCloudServiceAgent::start()
|
|||||||
{
|
{
|
||||||
regenerate_pkce();
|
regenerate_pkce();
|
||||||
|
|
||||||
// Attempt silent sign-in from stored refresh token.
|
// Attempt silent sign-in from stored refresh token
|
||||||
// Use async=true so the HTTP round-trip does not block the main UI thread.
|
|
||||||
// start_sync_user_preset() guards with is_user_login(), so if the refresh has
|
|
||||||
// not completed by the time it is called the sync simply defers to the next
|
|
||||||
// login-complete callback — safe and preferred over a 30-second UI stall.
|
|
||||||
std::string stored_refresh;
|
std::string stored_refresh;
|
||||||
if (load_refresh_token(stored_refresh) && !stored_refresh.empty()) {
|
if (load_refresh_token(stored_refresh) && !stored_refresh.empty()) {
|
||||||
refresh_now(stored_refresh, "startup_refresh", true);
|
refresh_now(stored_refresh, "refresh token", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
return BAMBU_NETWORK_SUCCESS;
|
return BAMBU_NETWORK_SUCCESS;
|
||||||
|
|||||||
Reference in New Issue
Block a user