mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-14 17:12:07 +00:00
FIX: stop video when not visible
Change-Id: Ibc5204084efec5381a7ede9face0519276592aa8
This commit is contained in:
@@ -146,9 +146,10 @@ MediaFilePanel::MediaFilePanel(wxWindow * parent)
|
||||
m_button_delete->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [this](auto &e) { m_image_grid->DoActionOnSelection(0); });
|
||||
|
||||
auto onShowHide = [this](auto &e) {
|
||||
e.Skip();
|
||||
if (m_isBeingDeleted) return;
|
||||
auto fs = m_image_grid ? m_image_grid->GetFileSystem() : nullptr;
|
||||
if (fs) e.IsShown() && IsShown() ? fs->Start() : fs->Stop();
|
||||
if (fs) IsShownOnScreen() ? fs->Start() : fs->Stop();
|
||||
};
|
||||
Bind(wxEVT_SHOW, onShowHide);
|
||||
parent->GetParent()->Bind(wxEVT_SHOW, onShowHide);
|
||||
|
||||
Reference in New Issue
Block a user