X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/2e588733c759cccd2d86e34a3a394b9a8ab0c800..aa748158342da7acd1bc485aa36534e9f7dde151:/src/dolphinviewcontainer.cpp 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; }