mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-08-19 12:39:13 +08:00
ENH: Optimize Makerlab WebLoad
JIRA: none Change-Id: I2761610be8d6d173dbcc37147e67cfb682cd4440
This commit is contained in:
parent
15ed292c31
commit
9878569913
@ -352,7 +352,7 @@ function SendWXMessage( strMsg )
|
||||
|
||||
if(bCheck!=null)
|
||||
{
|
||||
window.wx.postMessage(strMsg);
|
||||
setTimeout("window.wx.postMessage("+strMsg+")",1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4131,11 +4131,11 @@ std::string GUI_App::handle_web_request(std::string cmd)
|
||||
}
|
||||
}
|
||||
else if (command_str.compare("modelmall_model_advise_get") == 0) {
|
||||
CallAfter([this] {
|
||||
if (mainframe && this->app_config->get("staff_pick_switch") == "true") {
|
||||
if (mainframe->m_webview) {
|
||||
mainframe->m_webview->SendDesignStaffpick(has_model_mall());
|
||||
}
|
||||
if (mainframe->m_webview) { mainframe->m_webview->SendDesignStaffpick(has_model_mall()); }
|
||||
}
|
||||
});
|
||||
}
|
||||
else if (command_str.compare("modelmall_model_open") == 0) {
|
||||
if (root.get_child_optional("data") != boost::none) {
|
||||
@ -4256,7 +4256,9 @@ std::string GUI_App::handle_web_request(std::string cmd)
|
||||
}
|
||||
}
|
||||
else if (command_str.compare("homepage_makerlab_get") == 0) {
|
||||
CallAfter([this] {
|
||||
if (mainframe && mainframe->m_webview) { mainframe->m_webview->SendMakerlabList(); }
|
||||
});
|
||||
}
|
||||
else if (command_str.compare("homepage_makerlab_open") == 0) {
|
||||
if (root.get_child_optional("url") != boost::none) {
|
||||
@ -4323,9 +4325,9 @@ std::string GUI_App::handle_web_request(std::string cmd)
|
||||
}
|
||||
else if (command_str.compare("homepage_printhistory_get")==0)
|
||||
{
|
||||
if (mainframe && mainframe->m_webview) {
|
||||
mainframe->m_webview->ShowUserPrintTask(true);
|
||||
}
|
||||
CallAfter([this] {
|
||||
if (mainframe && mainframe->m_webview) { mainframe->m_webview->ShowUserPrintTask(true); }
|
||||
});
|
||||
}
|
||||
else if (command_str.compare("homepage_leftmenu_change_width") == 0) {
|
||||
int NewWidth = 214;
|
||||
|
@ -279,8 +279,6 @@ WebViewPanel::WebViewPanel(wxWindow *parent)
|
||||
SendDesignStaffpick(true);
|
||||
}
|
||||
});
|
||||
|
||||
SwitchWebContent("home");
|
||||
}
|
||||
|
||||
WebViewPanel::~WebViewPanel()
|
||||
@ -1293,6 +1291,11 @@ void WebViewPanel::OnNavigationComplete(wxWebViewEvent& evt)
|
||||
}
|
||||
}
|
||||
|
||||
if (m_browser != nullptr && evt.GetId() == m_browser->GetId())
|
||||
{
|
||||
SwitchWebContent("home");
|
||||
}
|
||||
|
||||
//m_browser->Show();
|
||||
Layout();
|
||||
BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << ": " << evt.GetTarget().ToUTF8().data();
|
||||
|
Loading…
x
Reference in New Issue
Block a user