mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fixes in the buddy finding algorithm.
I was comparing the strings in the opposite direction. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
358611d029
commit
2827da5ecf
1 changed files with 5 additions and 4 deletions
|
@ -2397,7 +2397,7 @@ bool BuddyFilterModel::filterRow(int source_row, const QModelIndex &source_paren
|
||||||
if (!buddyList.isEmpty()) {
|
if (!buddyList.isEmpty()) {
|
||||||
buddyList.removeLast(); // remove the "Show Empty Tags";
|
buddyList.removeLast(); // remove the "Show Empty Tags";
|
||||||
for(int i = 0; i < rowCount(); i++){
|
for(int i = 0; i < rowCount(); i++){
|
||||||
if(checkState[i] && stringList()[i].indexOf(diveBuddy) != -1){
|
if(checkState[i] && diveBuddy.indexOf(stringList()[i]) != -1){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2476,13 +2476,14 @@ bool MultiFilterSortModel::filterAcceptsRow(int source_row, const QModelIndex &s
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool shouldShow = true;
|
||||||
Q_FOREACH (MultiFilterInterface *model, models) {
|
Q_FOREACH (MultiFilterInterface *model, models) {
|
||||||
if (model->filterRow(source_row, source_parent, sourceModel())) {
|
if (!model->filterRow(source_row, source_parent, sourceModel())) {
|
||||||
return true;
|
shouldShow = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return shouldShow;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MultiFilterSortModel::myInvalidate()
|
void MultiFilterSortModel::myInvalidate()
|
||||||
|
|
Loading…
Add table
Reference in a new issue