From 445f8280143b6a0286d602b5df43820940700044 Mon Sep 17 00:00:00 2001 From: cc9cii Date: Sat, 30 May 2015 18:22:58 +1000 Subject: [PATCH] Refresh filter only if one exists. Fixes Qt warning message "QSortFilterProxyModel: inconsistent changes reported by source model" when a record is deleted. --- apps/opencs/model/world/idtableproxymodel.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/opencs/model/world/idtableproxymodel.cpp b/apps/opencs/model/world/idtableproxymodel.cpp index 987d27462..5c621cec1 100644 --- a/apps/opencs/model/world/idtableproxymodel.cpp +++ b/apps/opencs/model/world/idtableproxymodel.cpp @@ -56,6 +56,9 @@ bool CSMWorld::IdTableProxyModel::lessThan(const QModelIndex &left, const QModel void CSMWorld::IdTableProxyModel::refreshFilter() { - updateColumnMap(); - invalidateFilter(); + if (mFilter) + { + updateColumnMap(); + invalidateFilter(); + } }