mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
NEW: [STUDIO-2476] design_staffpick
Change-Id: Ibe4d540ca31882e199437dc2811925e1a40680ec
This commit is contained in:
parent
20ad3c7f9a
commit
84580f6f94
8 changed files with 97 additions and 2 deletions
|
@ -3664,6 +3664,24 @@ std::string GUI_App::handle_web_request(std::string cmd)
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (command_str.compare("modelmall_model_advise_get") == 0) {
|
||||
if (mainframe && this->app_config->get("staff_pick_switch") == "true") {
|
||||
if (mainframe->m_webview) {
|
||||
mainframe->m_webview->SendDesignStaffpick(m_agent);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (command_str.compare("modelmall_model_open") == 0) {
|
||||
if (root.get_child_optional("data") != boost::none) {
|
||||
pt::ptree data_node = root.get_child("data");
|
||||
boost::optional<std::string> id = data_node.get_optional<std::string>("id");
|
||||
if (id.has_value() && m_agent) {
|
||||
std::string url;
|
||||
if (m_agent->get_model_mall_detail_url(&url, id.value()) == 0)
|
||||
wxLaunchDefaultBrowser(url);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (command_str.compare("homepage_open_recentfile") == 0) {
|
||||
if (root.get_child_optional("data") != boost::none) {
|
||||
pt::ptree data_node = root.get_child("data");
|
||||
|
@ -4510,6 +4528,11 @@ void GUI_App::stop_http_server()
|
|||
m_http_server.stop();
|
||||
}
|
||||
|
||||
void GUI_App::switch_staff_pick(bool on)
|
||||
{
|
||||
mainframe->m_webview->SendDesignStaffpick(on ? m_agent : nullptr);
|
||||
}
|
||||
|
||||
bool GUI_App::switch_language()
|
||||
{
|
||||
if (select_language()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue