UI: Process deleteLater() tasks in OBSBasic::ClearSceneData
Causes QObject::deleteLater() events to be processed immediately in OBSBasic::ClearSceneData() to ensure no lingering source or scene item references remain
This commit is contained in:
parent
5a36bd5c9a
commit
e4f0c21252
1 changed files with 4 additions and 0 deletions
|
|
@ -4563,6 +4563,10 @@ void OBSBasic::ClearSceneData()
|
|||
|
||||
undo_s.clear();
|
||||
|
||||
/* using QEvent::DeferredDelete explicitly is the only way to ensure
|
||||
* that deleteLater events are processed at this point */
|
||||
QApplication::sendPostedEvents(nullptr, QEvent::DeferredDelete);
|
||||
|
||||
disableSaving--;
|
||||
|
||||
blog(LOG_INFO, "All scene data cleared");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue