FIX:fixed the issue of project page not refreshing in macOS

jira:[STUDIO-10110]

Change-Id: I2d137d7f34dbdb1dc0ffbdecbde530fbce969167
This commit is contained in:
tao wang 2025-01-22 20:05:41 +08:00 committed by Lane.Wei
parent fb9b23f894
commit 64c9c72128
1 changed files with 17 additions and 13 deletions

View File

@ -222,11 +222,15 @@ void ProjectPanel::on_reload(wxCommandEvent& evt)
wxString strJS = wxString::Format("HandleStudio(%s)", m_Res.dump(-1, ' ', false, json::error_handler_t::ignore));
#ifdef __APPLE__
wxGetApp().CallAfter([this, strJS] { RunScript(strJS.ToStdString()); });
#else
if (m_web_init_completed) {
wxGetApp().CallAfter([this, strJS] {
RunScript(strJS.ToStdString());
});
wxGetApp().CallAfter([this, strJS] { RunScript(strJS.ToStdString()); });
}
#endif
});
}