FIX: [STUDIO-3308] check has_model_mall

Change-Id: I9b7477af12a5d59855f7ef176aac24731665c343
This commit is contained in:
chunmao.guo 2023-06-21 10:58:08 +08:00 committed by Lane.Wei
parent a20229f222
commit 82cd618c14
3 changed files with 24 additions and 8 deletions

View file

@ -1771,7 +1771,7 @@ void GUI_App::restart_networking()
start_sync_user_preset();
}
if (mainframe && this->app_config->get("staff_pick_switch") == "true") {
if (mainframe->m_webview) { mainframe->m_webview->SendDesignStaffpick(true); }
if (mainframe->m_webview) { mainframe->m_webview->SendDesignStaffpick(has_model_mall()); }
}
}
BOOST_LOG_TRIVIAL(info) << __FUNCTION__<< boost::format(" exit, m_agent=%1%")%m_agent;
@ -2993,14 +2993,19 @@ void GUI_App::update_label_colours_from_appconfig()
void GUI_App::update_publish_status()
{
if (app_config->get_country_code() == "CN") {
mainframe->show_publish_button(false);
}
else {
mainframe->show_publish_button(true);
mainframe->show_publish_button(has_model_mall());
if (app_config->get("staff_pick_switch") == "true") {
mainframe->m_webview->SendDesignStaffpick(has_model_mall());
}
}
bool GUI_App::has_model_mall()
{
if (app_config->get_country_code() == "CN")
return false;
return true;
}
void GUI_App::update_label_colours()
{
for (Tab* tab : tabs_list)