Crash. Forgot check event type.
--HG-- branch : develop
This commit is contained in:
parent
586b541aec
commit
4fe796f508
|
@ -410,11 +410,14 @@ bool DialogTool::eventFilter(QObject *object, QEvent *event)
|
|||
QPlainTextEdit *plainTextEdit = qobject_cast<QPlainTextEdit *>(object);
|
||||
if (plainTextEdit != nullptr)
|
||||
{
|
||||
QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
|
||||
if ((keyEvent->key() == Qt::Key_Enter) || (keyEvent->key() == Qt::Key_Return))
|
||||
if (event->type() == QEvent::KeyPress)
|
||||
{
|
||||
// Ignore Enter key
|
||||
return true;
|
||||
QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
|
||||
if ((keyEvent->key() == Qt::Key_Enter) || (keyEvent->key() == Qt::Key_Return))
|
||||
{
|
||||
// Ignore Enter key
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue
Block a user