don't allow keys with empty text to reset the currently selected completion item

forwarding keys with empty text() does not restrict the matching items, but
updating the list of possible completions resets the currently selected item to
the first one
This commit is contained in:
Martin Aumüller
2010-01-11 17:54:02 +01:00
committed by hjk
parent 1a1d0e269d
commit fc1780f126

View File

@@ -211,6 +211,9 @@ bool CompletionWidget::event(QEvent *e)
forwardKeys = false; forwardKeys = false;
break; break;
default: default:
// if a key is forwarded, completion widget is re-opened and selected item is reset to first,
// so only forward keys that insert text and refine the completed item
forwardKeys = !ke->text().isEmpty();
break; break;
} }