FIX: [STUDIO-1033] rm webview script handler on webview destory

Change-Id: If1465ba6bf997bf17b8a33bc33d0f20d34fcbdc7
This commit is contained in:
chunmao.guo 2023-03-09 17:09:30 +08:00 committed by Lane.Wei
parent db65fd6e83
commit 9f3a89320b
4 changed files with 14 additions and 10 deletions

View file

@ -311,7 +311,7 @@ void MediaPlayCtrl::ToggleStream()
{ return std::make_shared<UpgradeNetworkJob2>(pri); }
void on_finish() override
{
wxGetApp().CallAfter([ctrl = this->ctrl] { ctrl->ToggleStream(); });
ctrl->CallAfter([ctrl = this->ctrl] { ctrl->ToggleStream(); });
EndModal(wxID_CLOSE);
}
};
@ -585,7 +585,7 @@ void wxMediaCtrl2::DoSetSize(int x, int y, int width, int height, int sizeFlags)
if (maxHeight != GetMaxHeight()) {
// BOOST_LOG_TRIVIAL(info) << "wxMediaCtrl2::DoSetSize: width: " << width << ", height: " << height << ", maxHeight: " << maxHeight;
SetMaxSize({-1, maxHeight});
Slic3r::GUI::wxGetApp().CallAfter([this] {
CallAfter([this] {
if (auto p = GetParent()) {
p->Layout();
p->Refresh();