mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-14 10:17:55 -06:00
FIX: MediaPlayCtrl crash on switch language
Change-Id: If69bd42f586e6e15387ffe387c820480cbf750dd
This commit is contained in:
parent
30a473c977
commit
73242280ef
3 changed files with 15 additions and 8 deletions
|
@ -59,13 +59,8 @@ MediaPlayCtrl::MediaPlayCtrl(wxWindow *parent, wxMediaCtrl2 *media_ctrl, const w
|
|||
// m_next_retry = wxDateTime::Now();
|
||||
//#endif
|
||||
|
||||
auto onShowHide = [this](auto &e) {
|
||||
e.Skip();
|
||||
if (m_isBeingDeleted) return;
|
||||
IsShownOnScreen() ? Play() : Stop();
|
||||
};
|
||||
parent->Bind(wxEVT_SHOW, onShowHide);
|
||||
parent->GetParent()->GetParent()->Bind(wxEVT_SHOW, onShowHide);
|
||||
parent->Bind(wxEVT_SHOW, &MediaPlayCtrl::on_show_hide, this);
|
||||
parent->GetParent()->GetParent()->Bind(wxEVT_SHOW, &MediaPlayCtrl::on_show_hide, this);
|
||||
|
||||
m_lan_user = "bblp";
|
||||
m_lan_passwd = "bblp";
|
||||
|
@ -387,6 +382,13 @@ void MediaPlayCtrl::SetStatus(wxString const &msg2, bool hyperlink)
|
|||
|
||||
bool MediaPlayCtrl::IsStreaming() const { return m_streaming; }
|
||||
|
||||
void MediaPlayCtrl::on_show_hide(wxShowEvent &evt)
|
||||
{
|
||||
evt.Skip();
|
||||
if (m_isBeingDeleted) return;
|
||||
IsShownOnScreen() ? Play() : Stop();
|
||||
}
|
||||
|
||||
void MediaPlayCtrl::media_proc()
|
||||
{
|
||||
boost::unique_lock lock(m_mutex);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue