]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fix dismiss button in selection mode paste bar
authorFelix Ernst <fe.a.ernst@gmail.com>
Thu, 13 Oct 2022 20:13:00 +0000 (22:13 +0200)
committerFelix Ernst <felixernst@kde.org>
Sat, 15 Oct 2022 08:44:41 +0000 (08:44 +0000)
This one liner changes the signal that is emitted when the
"Dismiss" button is pressed on the Paste bottom bar in selection
mode. Before this commit, the `leaveSelectionModeRequested()`
signal was used but it had no effect because technically the
selection mode isn't active anymore when the paste bar is shown.

Everything works as expected if instead
`barVisibilityChangeRequested()` is emitted.

src/selectionmode/bottombarcontentscontainer.cpp
src/selectionmode/bottombarcontentscontainer.h

index 048e845a01d38cf2639ee4b28db24efbb3dc6cb7..1634cf4c98a9c12de328b5b29925c0a2e86d5b0f 100644 (file)
@@ -388,7 +388,7 @@ void BottomBarContentsContainer::addPasteContents()
      * So we first have to claim that we have different contents before requesting to leave selection mode. */
     auto actuallyLeaveSelectionMode = [this]() {
         m_contents = BottomBar::Contents::CopyLocationContents;
-        Q_EMIT selectionModeLeavingRequested();
+        Q_EMIT barVisibilityChangeRequested(false);
     };
 
     auto *pasteButton = new QPushButton(this);
index 6d44adf740d96a9893b72fbe3d0651f8f0bd6078..6cb66fcc1bb5f3b72109b5852f83742fced35bee 100644 (file)
@@ -74,7 +74,7 @@ Q_SIGNALS:
 
     /**
      * When it does not make sense to show any specific contents, this signal is emitted and the receiver hides the bar.
-     * Later it might sense to show it again e.g. because the user selected items. Then this signal is used to request showing of the bar.
+     * Later it might make sense to show it again e.g. because the user selected items. Then this signal is used to request showing of the bar.
      */
     void barVisibilityChangeRequested(bool visible);