Merge pull request #463 from txtsd/enter_shenanigans

Only trigger macOS instance rename on KeyDown
This commit is contained in:
Ezekiel Smith 2022-04-20 08:34:30 +10:00 committed by GitHub
commit 27e803e4a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -364,7 +364,7 @@ public:
{ {
QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event); QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
auto key = keyEvent->key(); auto key = keyEvent->key();
if (key == Qt::Key_Return || key == Qt::Key_Enter) if ((key == Qt::Key_Return || key == Qt::Key_Enter) && eventType == QEvent::KeyPress)
{ {
emit editingDone(); emit editingDone();
return true; return true;