Skip to content

Commit

Permalink
Hide "Recent Files" list if empty (#557)
Browse files Browse the repository at this point in the history
fixes #548
  • Loading branch information
t-sommer authored Aug 13, 2024
1 parent a345c03 commit 16f3fa8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fmusim-gui/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ MainWindow::MainWindow(QWidget *parent)

QSettings settings;

QStringList recentFiles = settings.value("recentFiles").toStringList();
const QStringList recentFiles = settings.value("recentFiles").toStringList();

for (const QString& filename : recentFiles.mid(0, 5)) {
QFileInfo fileInfo(filename);
Expand All @@ -92,6 +92,8 @@ MainWindow::MainWindow(QWidget *parent)
vbox->addWidget(link);
}

ui->recentFilesGroupBox->setVisible(!recentFiles.isEmpty());

// load the web engine, so the window doesn't jump later
ui->plotWebEngineView->setHtml("");

Expand Down

0 comments on commit 16f3fa8

Please sign in to comment.