Skip to content

Commit

Permalink
GUI: eventFilter + Ctrl bugfix
Browse files Browse the repository at this point in the history
Avoid capturing just 'Ctrl' event, as this triggers unwanted UI redraw etc.
  • Loading branch information
rodlie committed Aug 31, 2024
1 parent 8340432 commit 4d1355d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/app/GUI/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1863,11 +1863,10 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *e)
if (keyEvent->modifiers() & Qt::SHIFT && key == Qt::Key_D) {
return processKeyEvent(keyEvent);
}
if (keyEvent->modifiers() & Qt::CTRL) {
if (key == Qt::Key_C || key == Qt::Key_V ||
key == Qt::Key_X || key == Qt::Key_D) {
return processKeyEvent(keyEvent);
}
if (keyEvent->modifiers() & Qt::CTRL &&
(key == Qt::Key_C || key == Qt::Key_V ||
key == Qt::Key_X || key == Qt::Key_D)) {
return processKeyEvent(keyEvent);
} else if (key == Qt::Key_A || key == Qt::Key_I ||
key == Qt::Key_Delete) {
return processKeyEvent(keyEvent);
Expand Down

0 comments on commit 4d1355d

Please sign in to comment.