Skip to content

Commit

Permalink
Fix toggling current item selection
Browse files Browse the repository at this point in the history
Fixes #2850
  • Loading branch information
hluk committed Oct 21, 2024
1 parent 4aab252 commit 702903a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/gui/clipboardbrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1390,6 +1390,16 @@ void ClipboardBrowser::keyPressEvent(QKeyEvent *event)

const int key = event->key();

// WORKAROUND: Avoid triggering search with Ctrl+Space toggle selection action.
if (mods.testFlag(Qt::ControlModifier) && key == Qt::Key_Space) {
const QModelIndex current = currentIndex();
if (!edit(current, AnyKeyPressed, event)) {
selectionModel()->select(current, selectionCommand(current, event));
event->accept();
return;
}
}

// This fixes few issues with default navigation and item selections.
switch (key) {
case Qt::Key_Up:
Expand Down

0 comments on commit 702903a

Please sign in to comment.