mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-29 05:42:33 +00:00
feature add bury point for soft
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
|
||||
#include <wx/glcanvas.h>
|
||||
|
||||
#include "sentry_wrapper/SentryWrapper.hpp"
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
//BBS: GUI refactor: to support top layout
|
||||
@@ -350,6 +351,8 @@ bool GLGizmosManager::open_gizmo(EType type)
|
||||
#ifdef __WXOSX__
|
||||
m_parent.post_event(SimpleEvent(wxEVT_PAINT));
|
||||
#endif
|
||||
if (EType::MmSegmentation == type)
|
||||
sentryReportLog(SENTRY_LOG_TRACE, "", BP_COLOR_PAINTING);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <algorithm>
|
||||
#include <iomanip>
|
||||
|
||||
#include "sentry_wrapper/SentryWrapper.hpp"
|
||||
#include <wx/frame.h>
|
||||
#include <wx/progdlg.h>
|
||||
#include <wx/sizer.h>
|
||||
@@ -152,6 +153,7 @@ void PrintHostSendDialog::init()
|
||||
|
||||
auto* btn_ok = add_button(wxID_OK, true, _L("Upload"));
|
||||
btn_ok->Bind(wxEVT_BUTTON, [this, validate_path](wxCommandEvent&) {
|
||||
sentryReportLog(SENTRY_LOG_TRACE, "", BP_UPLOAD);
|
||||
if (validate_path(txt_filename->GetValue())) {
|
||||
post_upload_action = PrintHostPostUploadAction::None;
|
||||
EndDialog(wxID_OK);
|
||||
@@ -172,6 +174,7 @@ void PrintHostSendDialog::init()
|
||||
if (post_actions.has(PrintHostPostUploadAction::StartPrint)) {
|
||||
auto* btn_print = add_button(wxID_YES, false, _L("Upload and Print"));
|
||||
btn_print->Bind(wxEVT_BUTTON, [this, validate_path](wxCommandEvent&) {
|
||||
sentryReportLog(SENTRY_LOG_TRACE, "", BP_UPLOAD_AND_PRINT);
|
||||
if (validate_path(txt_filename->GetValue())) {
|
||||
post_upload_action = PrintHostPostUploadAction::StartPrint;
|
||||
EndDialog(wxID_OK);
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
#include <sstream>
|
||||
#include <slic3r/GUI/Widgets/WebView.hpp>
|
||||
#include "sentry_wrapper/SentryWrapper.hpp"
|
||||
using namespace std;
|
||||
|
||||
using namespace nlohmann;
|
||||
@@ -198,11 +199,13 @@ void SMUserLogin::OnNavigationRequest(wxWebViewEvent &evt)
|
||||
http.header("Authorization",token);
|
||||
http.on_complete([&](std::string body, unsigned status) {
|
||||
if (status == 200) {
|
||||
std::string user_id = "";
|
||||
json response = json::parse(body);
|
||||
if (response.count("data")) {
|
||||
json data = response["data"];
|
||||
if (data.count("id")) {
|
||||
wxGetApp().sm_get_userinfo()->set_user_id(std::to_string(data["id"].get<int>()));
|
||||
user_id = std::to_string(data["id"].get<int>());
|
||||
}
|
||||
if (data.count("nickname")) {
|
||||
wxGetApp().sm_get_userinfo()->set_user_name(data["nickname"].get<std::string>());
|
||||
@@ -214,13 +217,15 @@ void SMUserLogin::OnNavigationRequest(wxWebViewEvent &evt)
|
||||
wxGetApp().sm_get_userinfo()->set_user_account(data["account"].get<std::string>());
|
||||
}
|
||||
}
|
||||
|
||||
string userInfo = BP_LOGIN_USER_ID + std::string(":") + user_id;
|
||||
sentryReportLog(SENTRY_LOG_TRACE, userInfo, BP_LOGIN);
|
||||
wxGetApp().sm_get_userinfo()->set_user_token(token);
|
||||
wxGetApp().sm_get_userinfo()->set_user_login(true);
|
||||
}
|
||||
})
|
||||
.on_error([&](std::string body, std::string error, unsigned status) {
|
||||
|
||||
std::string http_code = BP_LOGIN_HTTP_CODE + string(":") + std::to_string(status);
|
||||
sentryReportLog(SENTRY_LOG_TRACE, http_code, BP_LOGIN);
|
||||
})
|
||||
.perform_sync();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user