mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-12 12:54:29 +00:00
Fix rubber band not going away after right-click
Summary: Fix rubber band not going away after right-click in the folder view Test Plan: Hold left click Drag to make rubber band Right click Reviewers: #dolphin, ngraham, elvisangelaccio Reviewed By: #dolphin, ngraham Subscribers: elvisangelaccio, ngraham, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D21590
This commit is contained in:
parent
f523585f1b
commit
aabfce1679
|
@ -596,6 +596,16 @@ bool KItemListController::mousePressEvent(QGraphicsSceneMouseEvent* event, const
|
|||
m_selectionManager->endAnchoredSelection();
|
||||
}
|
||||
|
||||
if (event->buttons() & Qt::RightButton) {
|
||||
// Stop rubber band from persisting after right-clicks
|
||||
KItemListRubberBand* rubberBand = m_view->rubberBand();
|
||||
if (rubberBand->isActive()) {
|
||||
disconnect(rubberBand, &KItemListRubberBand::endPositionChanged, this, &KItemListController::slotRubberBandChanged);
|
||||
rubberBand->setActive(false);
|
||||
m_view->setAutoScroll(false);
|
||||
}
|
||||
}
|
||||
|
||||
if (m_pressedIndex >= 0) {
|
||||
m_selectionManager->setCurrentItem(m_pressedIndex);
|
||||
|
||||
|
|
Loading…
Reference in a new issue