diff options
-rw-r--r-- | playerwidget.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/playerwidget.cpp b/playerwidget.cpp index d3d0191..57cbdc8 100644 --- a/playerwidget.cpp +++ b/playerwidget.cpp @@ -14,6 +14,7 @@ #include <QSqlQuery> #include <QAction> #include <QToolBar> +#include <QApplication> #include <algorithm> #include <taglib/fileref.h> @@ -384,7 +385,9 @@ void PlayerWidget::doFilter(){ QString filter = mFilter->text(); if(filter.isEmpty()){ mView->setModel(mViewModel); + return; } + qApp->setOverrideCursor(Qt::BusyCursor); mSearchModel->clear(); mSearchModel->setHorizontalHeaderLabels(QStringList() << tr("Name")); mView->setModel(mSearchModel); @@ -393,6 +396,7 @@ void PlayerWidget::doFilter(){ populateByArtist(root, filter); populateByGenre(root, filter); populateBySong(root, filter); + qApp->restoreOverrideCursor(); } void PlayerWidget::clearFilter(){ |