mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-04-20 17:17:25 -05:00
Fix non-modal-dialog answer being ignored
This commit is contained in:
parent
65545d85ba
commit
6d3964fa5d
|
|
@ -22,7 +22,6 @@ NonModalMessageDialog::NonModalMessageDialog(const QString &message, Type type)
|
|||
{
|
||||
setWindowTitle(obs_module_text("AdvSceneSwitcher.windowTitle"));
|
||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
auto layout = new QVBoxLayout(this);
|
||||
layout->addWidget(new QLabel(message, this));
|
||||
|
|
@ -67,6 +66,7 @@ QMessageBox::StandardButton NonModalMessageDialog::ShowMessage()
|
|||
{
|
||||
show();
|
||||
exec();
|
||||
this->deleteLater();
|
||||
return _answer;
|
||||
}
|
||||
|
||||
|
|
@ -78,6 +78,7 @@ std::optional<std::string> NonModalMessageDialog::GetInput()
|
|||
_inputEdit->setPlainText("");
|
||||
|
||||
exec();
|
||||
this->deleteLater();
|
||||
if (_answer == QMessageBox::Yes) {
|
||||
return _input.toStdString();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user