mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-27 06:02:08 +00:00
2.2.0 dev lxy 1218 (#73)
* Modification: Migrate login interface * Change 'China' to 'Chinese Mainland' * Add: wcp_networktestdialog * Optimization: Main process freezing when connecting devices * Add: wcp_gettimelapseinstance & wcp_defectdetactionconfig * Change: network test level * Optimization: U1 piece-by-piece printing alarm alert * Optimization: Adjust the display order of brands for the selected models * Fix: WebpresetDialog now loads presets synchronously to prevent crashes * Add: wcp_sw_SubscribePageStateChange & wcp_sw_UnsubscribePageStateChange
This commit is contained in:
@@ -7236,6 +7236,24 @@ void GUI_App::device_card_notify(const json& res)
|
||||
}
|
||||
}
|
||||
|
||||
void GUI_App::page_state_notify_webview(wxWebView* webview, const std::string& state)
|
||||
{
|
||||
if (!webview) return;
|
||||
|
||||
json notification_data;
|
||||
notification_data["state"] = state;
|
||||
|
||||
for (const auto& instance : m_page_state_subscribers) {
|
||||
if (instance.first == webview) {
|
||||
auto ptr = instance.second.lock();
|
||||
if (ptr) {
|
||||
ptr->m_res_data = notification_data;
|
||||
ptr->send_to_js();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GUI_App::cache_notify(const std::string& key, const json& res)
|
||||
{
|
||||
for (const auto& instance : m_cache_subscribers) {
|
||||
|
||||
Reference in New Issue
Block a user