UI: Fix double confirmation dialog while discarding source change

QDialog::closeEvent() already calls the reject() function, the override
of the former function was actually allowing a first confirmation dialog
which once discarded gets re-openned by QDialog::closeEvent().

Removing most of the closeEvent() override code is enough to fix the issue
since reject() will be called showing the confirmation dialog.
This commit is contained in:
tytan652
2024-04-13 16:54:32 -07:00
committed by Lain
parent 79dd0214a8
commit 3b87098508
+2 -11
View File
@@ -476,18 +476,9 @@ void OBSBasicProperties::reject()
void OBSBasicProperties::closeEvent(QCloseEvent *event)
{
if (!acceptClicked && (CheckSettings() != 0)) {
if (!ConfirmQuit()) {
event->ignore();
return;
}
}
QDialog::closeEvent(event);
if (!event->isAccepted())
return;
Cleanup();
if (event->isAccepted())
Cleanup();
}
bool OBSBasicProperties::nativeEvent(const QByteArray &, void *message,