From f72fa2285882e7748b84d06aa2c4de91fe5ccde4 Mon Sep 17 00:00:00 2001 From: Matt Gajownik Date: Mon, 24 Aug 2020 22:28:31 +1000 Subject: [PATCH] UI: Don't open second dialog if close event is ignored Affects Interact, Filter and Property dialogs. --- UI/window-basic-main.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/UI/window-basic-main.cpp b/UI/window-basic-main.cpp index b8bd743cd..38c14d2a9 100644 --- a/UI/window-basic-main.cpp +++ b/UI/window-basic-main.cpp @@ -2640,8 +2640,12 @@ void OBSBasic::UpdatePreviewScalingMenu() void OBSBasic::CreateInteractionWindow(obs_source_t *source) { + bool closed = true; if (interaction) - interaction->close(); + closed = interaction->close(); + + if (!closed) + return; interaction = new OBSBasicInteraction(this, source); interaction->Init(); @@ -2650,8 +2654,12 @@ void OBSBasic::CreateInteractionWindow(obs_source_t *source) void OBSBasic::CreatePropertiesWindow(obs_source_t *source) { + bool closed = true; if (properties) - properties->close(); + closed = properties->close(); + + if (!closed) + return; properties = new OBSBasicProperties(this, source); properties->Init(); @@ -2660,8 +2668,12 @@ void OBSBasic::CreatePropertiesWindow(obs_source_t *source) void OBSBasic::CreateFiltersWindow(obs_source_t *source) { + bool closed = true; if (filters) - filters->close(); + closed = filters->close(); + + if (!closed) + return; filters = new OBSBasicFilters(this, source); filters->Init();