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:
parent
79dd0214a8
commit
3b87098508
1 changed files with 2 additions and 11 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue