From: vsv Date: Wed, 4 Jul 2018 17:46:30 +0000 (+0300) Subject: Provide completion on editing X-Git-Tag: EDF_2018-1~18 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=71092e6e9c3165597ef2b104e351524a1314d968;p=modules%2Fshaper.git Provide completion on editing --- diff --git a/src/ModuleBase/ModuleBase_ParamSpinBox.cpp b/src/ModuleBase/ModuleBase_ParamSpinBox.cpp index 349eec6b6..d0f527331 100644 --- a/src/ModuleBase/ModuleBase_ParamSpinBox.cpp +++ b/src/ModuleBase/ModuleBase_ParamSpinBox.cpp @@ -215,10 +215,8 @@ void ModuleBase_ParamSpinBox::showCompletion() int aStart, aEnd; QString aPrefix; aPrefix = getPrefix(aStart, aEnd); - if (aPrefix.length() > 0) { - myCompleter->setCompletionPrefix(aPrefix); - myCompleter->complete(); - } + myCompleter->setCompletionPrefix(aPrefix); + myCompleter->complete(); } void ModuleBase_ParamSpinBox::keyReleaseEvent(QKeyEvent* e) @@ -237,7 +235,11 @@ void ModuleBase_ParamSpinBox::keyReleaseEvent(QKeyEvent* e) } emit textChanged(lineEdit()->text()); break; - default: + case Qt::Key_Space: + if (e->modifiers() & Qt::ControlModifier) { + showCompletion(); + } + break; default: aText = e->text(); if (aText.length() == 1) { QChar aChar = aText.at(0);