* Copyright (C) 2011 by Peter Penz <peter.penz19@gmail.com> *
* Copyright (C) 2011 by Frank Reininghaus <frank78ac@googlemail.com> *
* *
- * Based on the Itemviews NG project from Trolltech Labs: *
- * http://qt.gitorious.org/qt-labs/itemviews-ng *
+ * Based on the Itemviews NG project from Trolltech Labs *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
}
}
+void KItemListSelectionManager::replaceSelection(int index, int count)
+{
+ const KItemSet previous = selectedItems();
+ if (!previous.isEmpty()) {
+ m_selectedItems.clear();
+ m_isAnchoredSelectionActive = false;
+ }
+ setSelected(index, count);
+}
+
void KItemListSelectionManager::beginAnchoredSelection(int anchor)
{
if (anchor >= 0 && m_model && anchor < m_model->count()) {