KSPM: Only clear firstChild mappings for top-level

Otherwise we would accidentally clear row 0 in top-level in the proxy
when some nested row 0 is removed in the source.
wilder
Stephen Kelly 10 years ago
parent d75d4a844e
commit 504be82ba6
  1. 2
      src/kselectionproxymodel.cpp

@ -1263,8 +1263,10 @@ void KSelectionProxyModelPrivate::endRemoveRows(const QModelIndex &sourceParent,
// If D and F are selected, the proxy contains E, F, G, H. If B is then deleted E to H will
// be removed, including both first child mappings at E and G.
if (!proxyParent.isValid()) {
removeFirstChildMappings(proxyStart, proxyEnd);
}
}
if (proxyParent.isValid()) {
updateInternalIndexes(proxyParent, proxyEnd + 1, -1 * (proxyEnd - proxyStart + 1));

Loading…
Cancel
Save