diff --git a/resources/web/homepage2/js/left.js b/resources/web/homepage2/js/left.js index 72dd48f8a0..73eff5510d 100644 --- a/resources/web/homepage2/js/left.js +++ b/resources/web/homepage2/js/left.js @@ -8,7 +8,7 @@ function OnInit() TranslatePage(); SendMsg_GetLoginInfo(); - GotoMenu( 'home' ); + GotoMenu( 'home' ); } function HandleStudio( pVal ) diff --git a/resources/web/include/globalapi.js b/resources/web/include/globalapi.js index 0553483e1a..e906e21c1d 100644 --- a/resources/web/include/globalapi.js +++ b/resources/web/include/globalapi.js @@ -424,4 +424,17 @@ function ExecuteDarkMode( DarkCssPath ) } } -SwitchDarkMode( "./css/dark.css" ); \ No newline at end of file +SwitchDarkMode( "./css/dark.css" ); + +/*-------KeyBoard------*/ +function DisableCtrlHotkey() +{ + document.onkeydown = function(event) { + event = event || window.event; + if (event.ctrlKey ) { + event.preventDefault(); + } + } +} + +DisableCtrlHotkey(); \ No newline at end of file diff --git a/src/slic3r/GUI/Jobs/FillBedJob.cpp b/src/slic3r/GUI/Jobs/FillBedJob.cpp index 00b4a1cce6..ae5be42a8e 100644 --- a/src/slic3r/GUI/Jobs/FillBedJob.cpp +++ b/src/slic3r/GUI/Jobs/FillBedJob.cpp @@ -286,10 +286,12 @@ void FillBedJob::finalize() else ap.bed_idx = cur_plate; - ap.row = ap.bed_idx / plate_cols; - ap.col = ap.bed_idx % plate_cols; - ap.translation(X) += bed_stride_x(m_plater) * ap.col; - ap.translation(Y) -= bed_stride_y(m_plater) * ap.row; + if (m_selected.size() <= 100) { + ap.row = ap.bed_idx / plate_cols; + ap.col = ap.bed_idx % plate_cols; + ap.translation(X) += bed_stride_x(m_plater) * ap.col; + ap.translation(Y) -= bed_stride_y(m_plater) * ap.row; + } ap.apply(); diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index de5cf18c1f..3ae47d5e70 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -12738,8 +12738,8 @@ std::vector Plater::get_empty_cells(const Vec2f step) Vec2d vmin(box.min.x(), box.min.y()), vmax(box.max.x(), box.max.y()); exclude_boxs.emplace_back(vmin, vmax); } - for (float x = min_x; x < bbox.max.x() - step(0) / 2; x += step(0)) - for (float y = min_y; y < bbox.max.y() - step(1) / 2; y += step(1)) { + for (float x = min_x + bbox.min.x(); x < bbox.max.x() - step(0) / 2; x += step(0)) + for (float y = min_y + bbox.min.y(); y < bbox.max.y() - step(1) / 2; y += step(1)) { bool in_exclude = false; BoundingBoxf cell(Vec2d(x - step(0) / 2, y - step(1) / 2), Vec2d(x + step(0) / 2, y + step(1) / 2)); for (auto& box : exclude_boxs) { diff --git a/src/slic3r/GUI/WebViewDialog.cpp b/src/slic3r/GUI/WebViewDialog.cpp index 5785bba41b..00fddc2ec0 100644 --- a/src/slic3r/GUI/WebViewDialog.cpp +++ b/src/slic3r/GUI/WebViewDialog.cpp @@ -119,7 +119,6 @@ WebViewPanel::WebViewPanel(wxWindow *parent) m_browserLeft->SetMinSize(wxSize(FromDIP(224), -1)); m_browserLeft->SetMaxSize(wxSize(FromDIP(224), -1)); - this->SetBackgroundColour(*wxWHITE); m_home_web->Add(m_browserLeft, 0, wxEXPAND | wxALL, 0); m_home_web->Add(m_browser, 1, wxEXPAND | wxALL, 0); m_home_web->Add(m_browserMW, 1, wxEXPAND | wxALL, 0); @@ -271,6 +270,10 @@ WebViewPanel::~WebViewPanel() void WebViewPanel::ResetWholePage() { if (m_browserLeft != nullptr && m_leftfirst) m_browserLeft->Reload(); + + auto host = wxGetApp().get_model_http_url(wxGetApp().app_config->get_country_code()); + std::string mwurl = (boost::format("%1%studio/webview?from=bambustudio") % host).str(); + m_browserMW->LoadURL(mwurl); } void WebViewPanel::load_url(wxString& url) @@ -610,10 +613,19 @@ void WebViewPanel::SendMakerlabList( ) } CallAfter([this, body] { auto body2 = from_u8(body); - body2.insert(1, "\"command\": \"homepage_makerlab_get\", "); - RunScript(wxString::Format("window.postMessage(%s)", body2)); - SetLeftMenuShow("makerlab", 1); + json jLab = json::parse(body2); + if (jLab.contains("list")) + { + int nSize = jLab["list"].size(); + if (nSize > 0) + { + body2.insert(1, "\"command\": \"homepage_makerlab_get\", "); + RunScript(wxString::Format("window.postMessage(%s)", body2)); + + SetLeftMenuShow("makerlab", 1); + } + } }); }); } catch (nlohmann::detail::parse_error &err) { @@ -627,22 +639,6 @@ void WebViewPanel::SendMakerlabList( ) } } -//void WebViewPanel::OpenModelDetail(std::string id, NetworkAgent *agent) -//{ -// std::string url; -// if ((agent ? agent->get_model_mall_detail_url(&url, id) : get_model_mall_detail_url(&url, id)) == 0) -// { -// if (url.find("?") != std::string::npos) -// { -// url += "&from=bambustudio"; -// } else { -// url += "?from=bambustudio"; -// } -// -// wxLaunchDefaultBrowser(url); -// } -//} - void WebViewPanel::OpenModelDetail(std::string id, NetworkAgent *agent) { SwitchLeftMenu("online"); @@ -760,29 +756,6 @@ std::string UrlDecode(const std::string &str) return strTemp; } -//void WebViewPanel::UpdateMakerworldLoginStatus() { -// NetworkAgent *agent = GUI::wxGetApp().getAgent(); -// if (agent == nullptr) return; -// -// int ret = agent->get_login_ticket([this](std::string body) { -// if (body.empty() || body.front() != '{') { -// BOOST_LOG_TRIVIAL(warning) << "get_login_ticket failed " + body; -// -// SetMakerworldPageLoginStatus(false); -// -// return; -// } -// CallAfter([this, body] { -// json jticket = json::parse(body); -// -// std::string ticket = jticket["ticket"]; -// -// SetMakerworldPageLoginStatus(true, ticket); -// }); -// } -// ); -//} - bool WebViewPanel::GetJumpUrl(bool login, wxString ticket, wxString targeturl, wxString &finalurl) { std::string h = wxGetApp().get_model_http_url(wxGetApp().app_config->get_country_code()); @@ -1258,7 +1231,7 @@ void WebViewPanel::OnError(wxWebViewEvent& evt) // Show the info bar with an error } - m_info->ShowMessage(_L("An error occurred loading ") + evt.GetURL() + "\n" + "'" + category + "'", wxICON_ERROR); + //m_info->ShowMessage(_L("An error occurred loading ") + evt.GetURL() + "\n" + "'" + category + "'", wxICON_ERROR); if (evt.GetInt() == wxWEBVIEW_NAV_ERR_CONNECTION && evt.GetId() == m_browserMW->GetId()) { diff --git a/src/slic3r/Utils/bambu_networking.hpp b/src/slic3r/Utils/bambu_networking.hpp index 0ba988b145..75e17f6b94 100644 --- a/src/slic3r/Utils/bambu_networking.hpp +++ b/src/slic3r/Utils/bambu_networking.hpp @@ -95,7 +95,7 @@ namespace BBL { #define BAMBU_NETWORK_LIBRARY "bambu_networking" #define BAMBU_NETWORK_AGENT_NAME "bambu_network_agent" -#define BAMBU_NETWORK_AGENT_VERSION "01.09.00.01" +#define BAMBU_NETWORK_AGENT_VERSION "01.09.00.03" //iot preset type strings #define IOT_PRINTER_TYPE_STRING "printer" diff --git a/version.inc b/version.inc index 66b0308886..0767d1b444 100644 --- a/version.inc +++ b/version.inc @@ -15,4 +15,4 @@ endif() # The build_version should start from 50 in master branch -set(SLIC3R_VERSION "01.09.00.57") +set(SLIC3R_VERSION "01.09.00.59")