UI: Don't open second dialog if close event is ignored

Affects Interact, Filter and Property dialogs.
master
Matt Gajownik 2020-08-24 22:28:31 +10:00
parent a4569ee2a0
commit f72fa22858
1 changed files with 15 additions and 3 deletions

View File

@ -2640,8 +2640,12 @@ void OBSBasic::UpdatePreviewScalingMenu()
void OBSBasic::CreateInteractionWindow(obs_source_t *source) void OBSBasic::CreateInteractionWindow(obs_source_t *source)
{ {
bool closed = true;
if (interaction) if (interaction)
interaction->close(); closed = interaction->close();
if (!closed)
return;
interaction = new OBSBasicInteraction(this, source); interaction = new OBSBasicInteraction(this, source);
interaction->Init(); interaction->Init();
@ -2650,8 +2654,12 @@ void OBSBasic::CreateInteractionWindow(obs_source_t *source)
void OBSBasic::CreatePropertiesWindow(obs_source_t *source) void OBSBasic::CreatePropertiesWindow(obs_source_t *source)
{ {
bool closed = true;
if (properties) if (properties)
properties->close(); closed = properties->close();
if (!closed)
return;
properties = new OBSBasicProperties(this, source); properties = new OBSBasicProperties(this, source);
properties->Init(); properties->Init();
@ -2660,8 +2668,12 @@ void OBSBasic::CreatePropertiesWindow(obs_source_t *source)
void OBSBasic::CreateFiltersWindow(obs_source_t *source) void OBSBasic::CreateFiltersWindow(obs_source_t *source)
{ {
bool closed = true;
if (filters) if (filters)
filters->close(); closed = filters->close();
if (!closed)
return;
filters = new OBSBasicFilters(this, source); filters = new OBSBasicFilters(this, source);
filters->Init(); filters->Init();