Fix:
when in a lower level, and search to an item that matches higher - the model navigates up - but the nav buttons dont change!!!!
this leads to a crash when press nav button!
e.g. Im/
Final Front../
El Dorado...
A/
B
If we are in 'B' and type 'Dorado' then we change to 'Im' - but nav buttons do not!
This commit is contained in:
@@ -27,7 +27,8 @@
|
||||
#include "playlistsproxymodel.h"
|
||||
#include "playlistsmodel.h"
|
||||
|
||||
PlaylistsProxyModel::PlaylistsProxyModel(QObject *parent) : QSortFilterProxyModel(parent)
|
||||
PlaylistsProxyModel::PlaylistsProxyModel(QObject *parent)
|
||||
: ProxyModel(parent)
|
||||
{
|
||||
setDynamicSortFilter(true);
|
||||
setFilterCaseSensitivity(Qt::CaseInsensitive);
|
||||
@@ -40,6 +41,9 @@ bool PlaylistsProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex &sou
|
||||
if (filterRegExp().isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
if (!isChildOfRoot(sourceParent)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent);
|
||||
PlaylistsModel::Item *item = static_cast<PlaylistsModel::Item *>(index.internalPointer());
|
||||
|
||||
Reference in New Issue
Block a user