Commit 75679f62 authored by Felix Ernst's avatar Felix Ernst 🇺🇦 Committed by Felix Ernst
Browse files

Fix dismiss button in selection mode paste bar

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.
parent 5be69f0d
......@@ -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);
......
......@@ -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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment