mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 11:23:42 +00:00
Compare commits
6 Commits
fix/linux-
...
feature/ht
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4e04bd4510 | ||
|
|
4f0bbf97b6 | ||
|
|
8e3caf4752 | ||
|
|
a5fd629bcc | ||
|
|
6aa7e9f4f5 | ||
|
|
f78836bef4 |
8
.idea/.gitignore
generated
vendored
8
.idea/.gitignore
generated
vendored
@@ -1,8 +0,0 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
2
.idea/OrcaSlicer.iml
generated
2
.idea/OrcaSlicer.iml
generated
@@ -1,2 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module classpath="CMake" type="CPP_MODULE" version="4" />
|
||||
7
.idea/codeStyles/Project.xml
generated
7
.idea/codeStyles/Project.xml
generated
@@ -1,7 +0,0 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<code_scheme name="Project" version="173">
|
||||
<clangFormatSettings>
|
||||
<option name="ENABLED" value="true" />
|
||||
</clangFormatSettings>
|
||||
</code_scheme>
|
||||
</component>
|
||||
5
.idea/codeStyles/codeStyleConfig.xml
generated
5
.idea/codeStyles/codeStyleConfig.xml
generated
@@ -1,5 +0,0 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<state>
|
||||
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
|
||||
</state>
|
||||
</component>
|
||||
4
.idea/misc.xml
generated
4
.idea/misc.xml
generated
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$" />
|
||||
</project>
|
||||
8
.idea/modules.xml
generated
8
.idea/modules.xml
generated
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/OrcaSlicer.iml" filepath="$PROJECT_DIR$/.idea/OrcaSlicer.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/vcs.xml
generated
6
.idea/vcs.xml
generated
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "Downloader.hpp"
|
||||
#include <boost/chrono/duration.hpp>
|
||||
#include <boost/log/detail/native_typeof.hpp>
|
||||
#include <libslic3r/Config.hpp>
|
||||
#include <wx/event.h>
|
||||
|
||||
// Localization headers: include libslic3r version first so everything in this file
|
||||
@@ -4835,12 +4836,12 @@ void GUI_App::on_http_error(wxCommandEvent &evt)
|
||||
BOOST_LOG_TRIVIAL(warning) << "logout: http error 401.";
|
||||
this->request_user_logout(provider);
|
||||
|
||||
if (!m_show_http_errpr_msgdlg) {
|
||||
if (!m_show_http_error_msgdlg) {
|
||||
MessageDialog msg_dlg(nullptr, _L("Login information expired. Please login again."), "", wxAPPLY | wxOK);
|
||||
m_show_http_errpr_msgdlg = true;
|
||||
m_show_http_error_msgdlg = true;
|
||||
auto modal_result = msg_dlg.ShowModal();
|
||||
if (modal_result == wxOK || modal_result == wxCLOSE) {
|
||||
m_show_http_errpr_msgdlg = false;
|
||||
m_show_http_error_msgdlg = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -4848,6 +4849,40 @@ void GUI_App::on_http_error(wxCommandEvent &evt)
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// No need to show dialog for 410: 410 means resource has been deleted from the server.
|
||||
if (status == 410) {
|
||||
BOOST_LOG_TRIVIAL(info) << "Http error 410.";
|
||||
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) {
|
||||
wxString msg;
|
||||
if (!error.empty()) {
|
||||
msg = wxString::Format(_L("API error (HTTP %u): %s"), status, wxString::FromUTF8(error));
|
||||
} else {
|
||||
msg = wxString::Format(_L("API error (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());
|
||||
}
|
||||
}
|
||||
|
||||
if (!m_is_error_shown) {
|
||||
m_is_error_shown = true;
|
||||
wxMessageBox(msg, _L("Orca Cloud API Error"), wxOK | wxICON_ERROR, wxGetApp().mainframe);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GUI_App::enable_user_preset_folder(bool enable)
|
||||
|
||||
@@ -324,7 +324,7 @@ private:
|
||||
bool m_is_dark_mode{ false };
|
||||
bool m_adding_script_handler { false };
|
||||
bool m_side_popup_status{false};
|
||||
bool m_show_http_errpr_msgdlg{false};
|
||||
bool m_show_http_error_msgdlg{false};
|
||||
bool m_show_error_msgdlg{false};
|
||||
wxString m_info_dialog_content;
|
||||
HttpServer m_http_server;
|
||||
|
||||
@@ -373,12 +373,13 @@ public:
|
||||
//BBS
|
||||
static int TOOLBAR_WINDOW_FLAGS;
|
||||
|
||||
bool display_initialized() const;
|
||||
|
||||
private:
|
||||
void init_font(bool compress);
|
||||
void init_input();
|
||||
void init_style();
|
||||
void render_draw_data(ImDrawData *draw_data);
|
||||
bool display_initialized() const;
|
||||
void destroy_font();
|
||||
std::vector<unsigned char> load_svg(const std::string& bitmap_name, unsigned target_width, unsigned target_height, unsigned *outwidth, unsigned *outheight);
|
||||
|
||||
|
||||
@@ -1304,6 +1304,7 @@ void OrcaCloudServiceAgent::load_sync_state()
|
||||
}
|
||||
}
|
||||
} catch (...) {
|
||||
BOOST_LOG_TRIVIAL(warning) << "load_sync_state: failed to read sync state file, resetting timestamp to 0";
|
||||
sync_state.last_sync_timestamp = 0;
|
||||
}
|
||||
}
|
||||
@@ -1322,7 +1323,9 @@ void OrcaCloudServiceAgent::save_sync_state()
|
||||
ofs.close();
|
||||
boost::filesystem::rename(tmp_path, sync_state_path);
|
||||
}
|
||||
} catch (...) {}
|
||||
} catch (...) {
|
||||
BOOST_LOG_TRIVIAL(warning) << "save_sync_state: failed to write sync state file";
|
||||
}
|
||||
}
|
||||
|
||||
void OrcaCloudServiceAgent::clear_sync_state()
|
||||
@@ -2230,7 +2233,9 @@ void OrcaCloudServiceAgent::json_to_map(const std::string& json, std::map<std::s
|
||||
map[it.key()] = it.value().dump();
|
||||
}
|
||||
}
|
||||
} catch (...) {}
|
||||
} catch (...) {
|
||||
BOOST_LOG_TRIVIAL(warning) << "json_to_map: failed to parse JSON";
|
||||
}
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
|
||||
Reference in New Issue
Block a user