diff --git a/companion/src/mainwindow.cpp b/companion/src/mainwindow.cpp index 50574ecd5..9d490da39 100644 --- a/companion/src/mainwindow.cpp +++ b/companion/src/mainwindow.cpp @@ -130,15 +130,9 @@ MainWindow::MainWindow(): else { if (!g.previousVersion().isEmpty()) g.warningId(g.warningId() | AppMessages::MSG_UPGRADED); + if (g.promptProfile()) { - QTimer::singleShot(updateDelay, this, SLOT(chooseProfile())); // add an extra second to give mainwindow time to load - updateDelay += 5000; // give user time to select profile before warnings - } - else { - if (checkProfileRadioExists(g.sessionId())) - QTimer::singleShot(updateDelay, this, SLOT(doAutoUpdates())); - else - g.warningId(g.warningId() | AppMessages::MSG_NO_RADIO_TYPE); + chooseProfile(); } } QTimer::singleShot(updateDelay, this, SLOT(displayWarnings())); @@ -184,6 +178,11 @@ MainWindow::MainWindow(): if (printing) { QTimer::singleShot(0, this, SLOT(autoClose())); } + + if (checkProfileRadioExists(g.sessionId())) + QTimer::singleShot(updateDelay, this, SLOT(doAutoUpdates())); + else + g.warningId(g.warningId() | AppMessages::MSG_NO_RADIO_TYPE); } MainWindow::~MainWindow() @@ -1805,10 +1804,8 @@ void MainWindow::chooseProfile() connect(pcd, &ProfileChooserDialog::profileChanged, this, &MainWindow::loadProfileId); pcd->exec(); delete pcd; - // doi here as need to wait until dialog dismissed and current radio type is set - if (checkProfileRadioExists(g.sessionId())) - doAutoUpdates(); - else + + if (!checkProfileRadioExists(g.sessionId())) g.warningId(g.warningId() | AppMessages::MSG_NO_RADIO_TYPE); } } diff --git a/companion/src/profilechooser.cpp b/companion/src/profilechooser.cpp index 17a9570e5..a8942652e 100644 --- a/companion/src/profilechooser.cpp +++ b/companion/src/profilechooser.cpp @@ -28,6 +28,7 @@ ProfileChooserDialog::ProfileChooserDialog(QWidget * parent): { ui->setupUi(this); setWindowIcon(QIcon(":/icon.png")); + setWindowFlags(Qt::Dialog | Qt::MSWindowsFixedSizeDialogHint); QComboBox *prof = ui->cboProfiles; prof->clear();