From 5eeae0e142b348331d907ea94b4cc0b84b3f947d Mon Sep 17 00:00:00 2001 From: "Tux3 / Mlkj / !Lev.uXFMLA" Date: Thu, 13 Nov 2014 20:32:09 +0100 Subject: [PATCH] Fix push to talk even when text edit focused --- src/widget/form/groupchatform.cpp | 6 ++++++ src/widget/groupwidget.cpp | 1 + 2 files changed, 7 insertions(+) diff --git a/src/widget/form/groupchatform.cpp b/src/widget/form/groupchatform.cpp index 2e3766f03..28e295f98 100644 --- a/src/widget/form/groupchatform.cpp +++ b/src/widget/form/groupchatform.cpp @@ -207,6 +207,9 @@ void GroupChatForm::onCallClicked() void GroupChatForm::keyPressEvent(QKeyEvent* ev) { + if (msgEdit->hasFocus()) + return; + // Push to talk if (ev->key() == Qt::Key_P && inCall) { @@ -223,6 +226,9 @@ void GroupChatForm::keyPressEvent(QKeyEvent* ev) void GroupChatForm::keyReleaseEvent(QKeyEvent* ev) { + if (msgEdit->hasFocus()) + return; + // Push to talk if (ev->key() == Qt::Key_P && inCall) { diff --git a/src/widget/groupwidget.cpp b/src/widget/groupwidget.cpp index 1ad06b5b8..3e9f149f0 100644 --- a/src/widget/groupwidget.cpp +++ b/src/widget/groupwidget.cpp @@ -128,6 +128,7 @@ void GroupWidget::keyPressEvent(QKeyEvent* ev) Group* g = GroupList::findGroup(groupId); if (g) g->chatForm->keyPressEvent(ev); + } void GroupWidget::keyReleaseEvent(QKeyEvent* ev)