X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_IntSpinBox.cpp;h=b35755ea9a593a06f94a7469a80d2ec8a6c809e4;hb=9aeb69897970e21212d6f8926ec33d2eb696f18d;hp=933cc845563dec52a89788f2ae5d41aa3534ef79;hpb=42985955d89fa845790a7e38609f5b6838285147;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_IntSpinBox.cpp b/src/ModuleBase/ModuleBase_IntSpinBox.cpp index 933cc8455..b35755ea9 100755 --- a/src/ModuleBase/ModuleBase_IntSpinBox.cpp +++ b/src/ModuleBase/ModuleBase_IntSpinBox.cpp @@ -8,23 +8,22 @@ #include ModuleBase_IntSpinBox::ModuleBase_IntSpinBox(QWidget* theParent) -: QSpinBox(theParent), - myIsModified(false) +: QSpinBox(theParent) { - connect(this, SIGNAL(valueChanged(const QString&)), this, SLOT(onValueChanged(const QString&))); } -void ModuleBase_IntSpinBox::onValueChanged(const QString& theValue) +void ModuleBase_IntSpinBox::keyPressEvent(QKeyEvent *theEvent) { - myIsModified = true; + 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); } -bool ModuleBase_IntSpinBox::isModified() const -{ - return myIsModified; -} - -void ModuleBase_IntSpinBox::clearModified() -{ - myIsModified = false; -}