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. 4
      src/kselectionproxymodel.cpp

@ -1263,7 +1263,9 @@ 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.
removeFirstChildMappings(proxyStart, proxyEnd);
if (!proxyParent.isValid()) {
removeFirstChildMappings(proxyStart, proxyEnd);
}
}
if (proxyParent.isValid()) {

Loading…
Cancel
Save