diff options
Diffstat (limited to 'src/dolphinviewcontainer.cpp')
| -rw-r--r-- | src/dolphinviewcontainer.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp index d69aa119f..f38995603 100644 --- a/src/dolphinviewcontainer.cpp +++ b/src/dolphinviewcontainer.cpp @@ -379,13 +379,14 @@ void DolphinViewContainer::setSelectionModeEnabled(bool enabled, KActionCollecti m_view->setSelectionModeEnabled(enabled); if (!enabled) { + if (!wasEnabled) { + return; // nothing to do here + } Q_CHECK_PTR(m_selectionModeTopBar); // there is no point in disabling selectionMode when it wasn't even enabled once. Q_CHECK_PTR(m_selectionModeBottomBar); m_selectionModeTopBar->setVisible(false, WithAnimation); m_selectionModeBottomBar->setVisible(false, WithAnimation); - if (wasEnabled) { - Q_EMIT selectionModeChanged(false); - } + Q_EMIT selectionModeChanged(false); return; } |
