mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
Correctly fake keyPressEvent for tabs and returns
since we need to filter for incorrect comma usage, we need to recurse instead of passing the keyEvent to the base class. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
37fa2fda03
commit
29b35ad6d8
1 changed files with 1 additions and 1 deletions
|
@ -182,7 +182,7 @@ void TagWidget::keyPressEvent(QKeyEvent *e)
|
||||||
MainWindow::instance()->information()->nextInputField(e); // by sending the key event to the MainTab widget
|
MainWindow::instance()->information()->nextInputField(e); // by sending the key event to the MainTab widget
|
||||||
} else if (e->key() == Qt::Key_Tab || e->key() == Qt::Key_Return) { // otherwise let's pretend this is a comma instead
|
} else if (e->key() == Qt::Key_Tab || e->key() == Qt::Key_Return) { // otherwise let's pretend this is a comma instead
|
||||||
QKeyEvent fakeEvent(e->type(), Qt::Key_Comma, e->modifiers(), QString(","));
|
QKeyEvent fakeEvent(e->type(), Qt::Key_Comma, e->modifiers(), QString(","));
|
||||||
GroupedLineEdit::keyPressEvent(&fakeEvent);
|
keyPressEvent(&fakeEvent);
|
||||||
} else {
|
} else {
|
||||||
GroupedLineEdit::keyPressEvent(e);
|
GroupedLineEdit::keyPressEvent(e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue