mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-20 00:41:23 +00:00
Fix selection issue when expanding a tree
The selection anchor must be reset when changing the current item to the root of the tree. BUG: 290832 FIXED-IN: 4.8.0
This commit is contained in:
parent
21a52d42e9
commit
2f42a397e0
|
@ -380,7 +380,9 @@ bool KItemListController::mousePressEvent(QGraphicsSceneMouseEvent* event, const
|
|||
}
|
||||
|
||||
if (m_view->isAboveExpansionToggle(m_pressedIndex, m_pressedMousePos)) {
|
||||
m_selectionManager->endAnchoredSelection();
|
||||
m_selectionManager->setCurrentItem(m_pressedIndex);
|
||||
m_selectionManager->beginAnchoredSelection(m_pressedIndex);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ private:
|
|||
KItemModelBase* m_model;
|
||||
|
||||
friend class KItemListController; // Calls setModel()
|
||||
friend class KItemListView; // Calls itemsInserted() and itemsRemoved()
|
||||
friend class KItemListView; // Calls itemsInserted(), itemsRemoved() and itemsMoved()
|
||||
friend class KItemListSelectionManagerTest;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue