Browse Source

Fix push to talk even when text edit focused

pull/744/head
Tux3 / Mlkj / !Lev.uXFMLA 11 years ago
parent
commit
5eeae0e142
No known key found for this signature in database
GPG Key ID: 7E086DD661263264
  1. 6
      src/widget/form/groupchatform.cpp
  2. 1
      src/widget/groupwidget.cpp

6
src/widget/form/groupchatform.cpp

@ -207,6 +207,9 @@ void GroupChatForm::onCallClicked() @@ -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) @@ -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)
{

1
src/widget/groupwidget.cpp

@ -128,6 +128,7 @@ void GroupWidget::keyPressEvent(QKeyEvent* ev) @@ -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)

Loading…
Cancel
Save