From: nds Date: Tue, 20 Oct 2015 09:32:59 +0000 (+0300) Subject: There is no key release in the eventFilter() of the operation manager, so the widget... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8dde879a1737ac9fb3c1178762af03c31b4c75b9;p=modules%2Fshaper.git There is no key release in the eventFilter() of the operation manager, so the widget should emit the keyReleased() signal. --- diff --git a/src/ModuleBase/ModuleBase_WidgetExprEditor.cpp b/src/ModuleBase/ModuleBase_WidgetExprEditor.cpp index 2d0e841a4..a7e7878e6 100644 --- a/src/ModuleBase/ModuleBase_WidgetExprEditor.cpp +++ b/src/ModuleBase/ModuleBase_WidgetExprEditor.cpp @@ -137,6 +137,7 @@ void ExpressionEditor::keyPressEvent(QKeyEvent* theEvent) switch (theEvent->key()) { case Qt::Key_Enter: case Qt::Key_Return: + emit keyReleased(theEvent); // do not react to the Enter key, the property panel processes it return; break; @@ -252,6 +253,10 @@ ModuleBase_WidgetExprEditor::ModuleBase_WidgetExprEditor( QWidget* theParent, //connect(myEditor, SIGNAL(editingFinished()), this, SLOT(onTextChanged())); connect(myEditor, SIGNAL(valueStored()), this, SLOT(onTextChanged())); connect(myEditor, SIGNAL(focusNextPrev()), this, SIGNAL(focusNextPrev())); + + connect(myEditor, SIGNAL(keyReleased(QKeyEvent*)), this, SIGNAL(keyReleased(QKeyEvent*))); + /// The signal about key release on the control, that corresponds to the attribute + /// \param theEvent key release event } ModuleBase_WidgetExprEditor::~ModuleBase_WidgetExprEditor() diff --git a/src/ModuleBase/ModuleBase_WidgetExprEditor.h b/src/ModuleBase/ModuleBase_WidgetExprEditor.h index 56d91029f..eb2ff9aa1 100644 --- a/src/ModuleBase/ModuleBase_WidgetExprEditor.h +++ b/src/ModuleBase/ModuleBase_WidgetExprEditor.h @@ -70,6 +70,10 @@ signals: void valueStored(); void focusNextPrev(); + /// The signal about key release on the control, that corresponds to the attribute + /// \param theEvent key release event + void keyReleased(QKeyEvent* theEvent); + protected: /// Perform completion by prefix /// \param theCompletionPrefix a prefix for looking for completion