forked from mirror/openmw-tes3mp
Refresh table filters when the model is updated. Should resolve Bug #2579.
This commit is contained in:
parent
6402b82823
commit
e6d2821b78
3 changed files with 12 additions and 0 deletions
|
@ -53,3 +53,9 @@ bool CSMWorld::IdTableProxyModel::lessThan(const QModelIndex &left, const QModel
|
|||
{
|
||||
return QSortFilterProxyModel::lessThan(left, right);
|
||||
}
|
||||
|
||||
void CSMWorld::IdTableProxyModel::refreshFilter()
|
||||
{
|
||||
updateColumnMap();
|
||||
invalidateFilter();
|
||||
}
|
||||
|
|
|
@ -34,6 +34,8 @@ namespace CSMWorld
|
|||
|
||||
void setFilter (const boost::shared_ptr<CSMFilter::Node>& filter);
|
||||
|
||||
void refreshFilter();
|
||||
|
||||
protected:
|
||||
|
||||
bool lessThan(const QModelIndex &left, const QModelIndex &right) const;
|
||||
|
|
|
@ -649,6 +649,10 @@ void CSVWorld::Table::tableSizeUpdate()
|
|||
}
|
||||
|
||||
emit tableSizeChanged (size, deleted, modified);
|
||||
|
||||
// not really related to tableSizeUpdate() but placed here for convenience rather than
|
||||
// creating a bunch of extra connections & slot
|
||||
mProxyModel->refreshFilter();
|
||||
}
|
||||
|
||||
void CSVWorld::Table::selectionSizeUpdate()
|
||||
|
|
Loading…
Reference in a new issue