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:
@@ -28,7 +28,8 @@
|
||||
#include "dirviewitemfile.h"
|
||||
#include "dirviewproxymodel.h"
|
||||
|
||||
DirViewProxyModel::DirViewProxyModel(QObject *parent) : QSortFilterProxyModel(parent)
|
||||
DirViewProxyModel::DirViewProxyModel(QObject *parent)
|
||||
: ProxyModel(parent)
|
||||
{
|
||||
setDynamicSortFilter(true);
|
||||
setFilterCaseSensitivity(Qt::CaseInsensitive);
|
||||
@@ -75,6 +76,9 @@ bool DirViewProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourc
|
||||
if (filterRegExp().isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
if (!isChildOfRoot(sourceParent)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent);
|
||||
DirViewItem *item = static_cast<DirViewItem *>(index.internalPointer());
|
||||
|
||||
Reference in New Issue
Block a user