mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-20 00:41:23 +00:00
Don't repaint a larger area than what's necessary when toggling the selection
from the action overlay. svn path=/trunk/KDE/kdebase/apps/; revision=1082374
This commit is contained in:
parent
6390610b96
commit
73406eee64
|
@ -147,9 +147,13 @@ void ActionOverlay::selected()
|
|||
QItemSelectionModel *m_selectionModel = view->selectionModel();
|
||||
|
||||
if (m_hoverIndex.isValid()) {
|
||||
const QModelIndex oldCurrent = m_selectionModel->currentIndex();
|
||||
m_selectionModel->select(m_hoverIndex, QItemSelectionModel::Toggle);
|
||||
m_selectionModel->setCurrentIndex(m_hoverIndex, QItemSelectionModel::NoUpdate);
|
||||
view->markAreaDirty(view->visibleArea());
|
||||
view->markAreaDirty(view->visualRect(m_hoverIndex));
|
||||
if (oldCurrent.isValid() && oldCurrent != m_hoverIndex) {
|
||||
view->markAreaDirty(view->visualRect(oldCurrent));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue