Skip to content

Commit

Permalink
Default confirm action to both enter keys
Browse files Browse the repository at this point in the history
Because Qt sees return and numpad enter as two different keys for some
reason. This distinction may still be useful for left-handed people, so
I don't want to remove it outright, but it now binds both keys to
confirming the current action.
  • Loading branch information
askmeaboutlo0m committed Aug 23, 2024
1 parent 3af75e8 commit 1d8f8a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Unreleased Version 2.2.2-pre
* Fix: Improve socket error messages, listing the error code and adding extra information on what to do if a proxy error occurs. Thanks FishEggsThe for reporting.
* Fix: Center soft brushes on the cursor better, they got offset to the top-left from correcting for size discontinuity before. Thanks Meiren for reporting.
* Fix: Don't mess up gridmap settings when opening brush settings dialog and initially changing a value in it. Thanks Blozzom for reporting.
* Fix: Default "confirm action" to both the regular enter key as well as the one on the numpad. Thanks MachKerman for reporting.

2024-08-09 Version 2.2.2-beta.3
* Fix: Use more accurate timers for performance profiles if the platform supports it.
Expand Down
4 changes: 3 additions & 1 deletion src/desktop/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5137,7 +5137,9 @@ void MainWindow::setupActions()
act->installEventFilter(m_tempToolSwitchShortcut);

// Other shortcuts
QAction *finishStrokeShortcut = makeAction("finishstroke", tr("Finish action")).shortcut(Qt::Key_Return);
QAction *finishStrokeShortcut =
makeAction("finishstroke", tr("Finish action"))
.shortcut(Qt::Key_Return, Qt::Key_Enter);
connect(finishStrokeShortcut, &QAction::triggered,
m_doc->toolCtrl(), &tools::ToolController::finishMultipartDrawing);

Expand Down

0 comments on commit 1d8f8a1

Please sign in to comment.