Fix windows being created when constructing ProgressDialog

This commit is contained in:
WarmUpTill
2023-10-11 12:37:54 +02:00
committed by WarmUpTill
parent 25ce8cd2e4
commit 9ac9171206

View File

@@ -249,7 +249,6 @@ ProgressDialog::ProgressDialog(QWidget *parent, bool showSkip)
"AdvSceneSwitcher.twitchCategories.fetchStart")))
{
setWindowTitle(obs_module_text("AdvSceneSwitcher.windowTitle"));
_skipFetchCheckBox->setVisible(showSkip);
auto layout = new QVBoxLayout(this);
layout->addWidget(_status);
auto cancelButton = new QPushButton(
@@ -264,6 +263,7 @@ ProgressDialog::ProgressDialog(QWidget *parent, bool showSkip)
QWidget::connect(cancelButton, &QPushButton::clicked, this,
[this]() { _skipFetch ? accept() : reject(); });
_skipFetchCheckBox->setVisible(showSkip);
if (_skipFetch) {
accept();
}