X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_IntSpinBox.cpp;h=197bfc22e52ebbf6f73c9d3a35a1c3b7e1de72bb;hb=0b0fa85288c496a5774247f3f336c098160d6aeb;hp=933cc845563dec52a89788f2ae5d41aa3534ef79;hpb=5ba2ac3f39478507bd781082adb879a43d4afe7e;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_IntSpinBox.cpp b/src/ModuleBase/ModuleBase_IntSpinBox.cpp index 933cc8455..197bfc22e 100755 --- a/src/ModuleBase/ModuleBase_IntSpinBox.cpp +++ b/src/ModuleBase/ModuleBase_IntSpinBox.cpp @@ -8,13 +8,13 @@ #include ModuleBase_IntSpinBox::ModuleBase_IntSpinBox(QWidget* theParent) -: QSpinBox(theParent), - myIsModified(false) +: QSpinBox(theParent)//, + //myIsModified(false) { - connect(this, SIGNAL(valueChanged(const QString&)), this, SLOT(onValueChanged(const QString&))); + //connect(this, SIGNAL(valueChanged(const QString&)), this, SLOT(onValueChanged(const QString&))); } -void ModuleBase_IntSpinBox::onValueChanged(const QString& theValue) +/*void ModuleBase_IntSpinBox::onValueChanged(const QString& theValue) { myIsModified = true; } @@ -27,4 +27,20 @@ bool ModuleBase_IntSpinBox::isModified() const void ModuleBase_IntSpinBox::clearModified() { myIsModified = false; +}*/ + +void ModuleBase_IntSpinBox::keyPressEvent(QKeyEvent *theEvent) +{ + switch (theEvent->key()) { + case Qt::Key_Enter: + case Qt::Key_Return: { + // do not react to the Enter key, the property panel processes it + return; + } + break; + default: + break; + } + QSpinBox::keyPressEvent(theEvent); } +