diff --git a/mainwindow.cpp b/mainwindow.cpp
index b6abe4a..3a8eb00 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -61,6 +61,7 @@ MainWindow::MainWindow(QWidget *parent)
m_mediaPlayer->setLoops(QMediaPlayer::Infinite);
ui->playlistView->setModel(m_playlistManager->model());
+ ui->chapterNameBtn->setVisible(false);
ui->chapterlistView->setModel(ui->playbackProgressIndicator->chapterModel());
ui->chapterlistView->setRootIsDecorated(false);
@@ -527,9 +528,13 @@ void MainWindow::initConnections()
ui->chapterNameBtn->setText(currentChapterName);
lastChapterName = currentChapterName;
}
- } else if (!lastChapterName.isEmpty()) {
- ui->chapterNameBtn->setText("");
- lastChapterName.clear();
+ ui->chapterNameBtn->setVisible(true);
+ } else {
+ if (!lastChapterName.isEmpty()) {
+ ui->chapterNameBtn->setText("");
+ lastChapterName.clear();
+ }
+ ui->chapterNameBtn->setVisible(false);
}
});
diff --git a/mainwindow.ui b/mainwindow.ui
index e212e2a..94e1785 100644
--- a/mainwindow.ui
+++ b/mainwindow.ui
@@ -714,7 +714,7 @@ QHeaderView {
About
- F1
+ F1
QAction::AboutRole
@@ -728,7 +728,7 @@ QHeaderView {
Open
- Ctrl+O
+ Ctrl+O
QAction::NoRole