mirror of
https://invent.kde.org/system/dolphin
synced 2024-07-07 10:51:45 +00:00
Set viewFocus when DolphinViewContainer state is consistent
Read Felix' comment here: https://invent.kde.org/system/dolphin/-/merge_requests/679#note_835657 In short: > The above change moves the `m_view->setFocus()` towards a point in time in > which `DolphinViewContainer`'s selection mode state is consistent again. BUG:478724
This commit is contained in:
parent
425fc930a6
commit
7043ae1100
|
@ -326,12 +326,13 @@ void DolphinViewContainer::setSelectionModeEnabled(bool enabled, KActionCollecti
|
|||
}
|
||||
Q_CHECK_PTR(m_selectionModeTopBar); // there is no point in disabling selectionMode when it wasn't even enabled once.
|
||||
Q_CHECK_PTR(m_selectionModeBottomBar);
|
||||
if (m_selectionModeTopBar->isAncestorOf(QApplication::focusWidget()) || m_selectionModeBottomBar->isAncestorOf(QApplication::focusWidget())) {
|
||||
m_view->setFocus();
|
||||
}
|
||||
m_selectionModeTopBar->setVisible(false, WithAnimation);
|
||||
m_selectionModeBottomBar->setVisible(false, WithAnimation);
|
||||
Q_EMIT selectionModeChanged(false);
|
||||
|
||||
if (m_selectionModeTopBar->isAncestorOf(QApplication::focusWidget()) || m_selectionModeBottomBar->isAncestorOf(QApplication::focusWidget())) {
|
||||
m_view->setFocus();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user