diff options
| author | Arno <arno@disconnect.de> | 2019-01-19 21:51:51 +0100 |
|---|---|---|
| committer | Arno <arno@disconnect.de> | 2019-01-19 21:51:51 +0100 |
| commit | 0e0d7944883fd7aad7c8334c9d7cc636d84a0630 (patch) | |
| tree | 9dacedee6e7ed0f329103138901720f53f2ebff5 /collectionfoldersview.cpp | |
| parent | 0d058fda9189f6bf96c70d71ffe1d18ca433e046 (diff) | |
| download | BeetPlayer-0e0d7944883fd7aad7c8334c9d7cc636d84a0630.tar.gz BeetPlayer-0e0d7944883fd7aad7c8334c9d7cc636d84a0630.tar.bz2 BeetPlayer-0e0d7944883fd7aad7c8334c9d7cc636d84a0630.zip | |
Always show an existing directory
When the current directory was deleted otherwhere while in
CollectionFoldersView, a refresh left the user with no choice at all.
Set mCurrentFolder to default (QSetting->folderdir) and say so in the
status bar.
For the latter add a signal to CollectionWidget and connect it to
PlayerWidget::message.
Diffstat (limited to 'collectionfoldersview.cpp')
| -rw-r--r-- | collectionfoldersview.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/collectionfoldersview.cpp b/collectionfoldersview.cpp index e1a96b2..483f42c 100644 --- a/collectionfoldersview.cpp +++ b/collectionfoldersview.cpp @@ -21,6 +21,12 @@ void CollectionFoldersView::populate(){ model()->setHorizontalHeaderLabels(headers()); QStandardItem *root = model()->invisibleRootItem(); QDir d(mCurrentFolder); + if(!d.exists()){ + QString msg = QString("%1 vanished from under us!").arg(mCurrentFolder); + emit message(msg); + readSettings(); + d.setPath(mCurrentFolder); + } QMimeDatabase db; QIcon songIcon(":/song.png"); QIcon otherIcon(":/belly_right_and_clear.png"); |
