mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-08-24 10:14:13 -05:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user