Divemaster and Buddy fields auto-completion are not saved

The added characters by auto-completion "for the last item"
isn't saved when using Return to save it "works well with
tab"

Fixes #469

Signed-off-by: Yousef Hamza <jo.adama.93@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Yosef Hamza 2014-03-23 01:38:39 +02:00 committed by Dirk Hohndel
parent 3b92803667
commit d4a1932276

View file

@ -205,7 +205,7 @@ void TagWidget::keyPressEvent(QKeyEvent *e)
popup->hide();
}
}
if (e->key() == Qt::Key_Tab) { // let's pretend this is a comma instead
if (e->key() == Qt::Key_Tab || e->key() == Qt::Key_Return) { // let's pretend this is a comma instead
QKeyEvent fakeEvent(e->type(), Qt::Key_Comma, e->modifiers(), QString(","));
GroupedLineEdit::keyPressEvent(&fakeEvent);
} else {