diff --git a/formatselectionwindow.cpp b/formatselectionwindow.cpp index b4f8610..f6d5fb1 100644 --- a/formatselectionwindow.cpp +++ b/formatselectionwindow.cpp @@ -30,6 +30,7 @@ void FormatSelectionWindow::populateTable(QVector formats) if (formats.length() == 0) { QMessageBox::information(this, "No formats found", "No formats found. Note that playlists aren't supported yet", QMessageBox::Ok); this->close(); + return; } ui->tableWidget->setRowCount(formats.length()); for(int i = 0; i < formats.length(); ++i) { @@ -41,6 +42,7 @@ void FormatSelectionWindow::populateTable(QVector formats) ui->tableWidget->setItem(i, 1, extension); ui->tableWidget->setItem(i, 2, formatText); } + show(); } void FormatSelectionWindow::on_pushButton_clicked() diff --git a/mainwindow.cpp b/mainwindow.cpp index 3e69cb9..abc122f 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -43,7 +43,6 @@ void MainWindow::on_pushButton_clicked() formatWindow->setYoutubeDl(ytdl); formatWindow->setInputUrl(ui->videoUrlEdit->text()); this->setCursor(Qt::ArrowCursor); - formatWindow->show(); break; } }