]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Apply widget value change by enter/tab event.
authornds <nds@opencascade.com>
Tue, 6 Oct 2015 10:14:17 +0000 (13:14 +0300)
committernds <nds@opencascade.com>
Tue, 6 Oct 2015 10:14:17 +0000 (13:14 +0300)
src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp
src/ModuleBase/ModuleBase_WidgetIntValue.cpp
src/PartSet/PartSet_WidgetPoint2d.cpp
src/PartSet/PartSet_WidgetPoint2dDistance.cpp

index 47799fc54eb11866cf5dff6b98b0588bed58b130..8cf2d67cc4814de14ea0e2b46333810dc8b69ea1 100644 (file)
@@ -85,7 +85,9 @@ ModuleBase_WidgetDoubleValue::ModuleBase_WidgetDoubleValue(QWidget* theParent,
   mySpinBox->setToolTip(aTTip);
 
   aControlLay->addRow(myLabel, mySpinBox);
-  connect(mySpinBox, SIGNAL(valueChanged(const QString&)), this, SIGNAL(valuesChanged()));
+  // Apply widget value change by enter/tab event.
+  //connect(mySpinBox, SIGNAL(valueChanged(const QString&)), this, SIGNAL(valuesChanged()));
+  connect(mySpinBox, SIGNAL(editingFinished()), this, SIGNAL(valuesChanged()));
 }
 
 ModuleBase_WidgetDoubleValue::~ModuleBase_WidgetDoubleValue()
index 6778b372c0212a0480dd77a3bde924a7bd761df7..622600ee2df9700f1cf06230e760eaa0f7272651 100644 (file)
@@ -84,7 +84,9 @@ ModuleBase_WidgetIntValue::ModuleBase_WidgetIntValue(QWidget* theParent,
   mySpinBox->setToolTip(aTTip);
 
   aControlLay->addRow(myLabel, mySpinBox);
-  connect(mySpinBox, SIGNAL(valueChanged(int)), this, SIGNAL(valuesChanged()));
+  // Apply widget value change by enter/tab event.
+  //connect(mySpinBox, SIGNAL(valueChanged(int)), this, SIGNAL(valuesChanged()));
+  connect(mySpinBox, SIGNAL(editingFinished()), this, SIGNAL(valuesChanged()));
 }
 
 ModuleBase_WidgetIntValue::~ModuleBase_WidgetIntValue()
index d94afa5a0dc5c10b0018a0e933bf2347e743a49b..3e25988ebf7def9cb3b1f376a2a7d9c44e1657f8 100644 (file)
@@ -88,7 +88,9 @@ PartSet_WidgetPoint2D::PartSet_WidgetPoint2D(QWidget* theParent,
     myXSpin->setToolTip(tr("X"));
     aGroupLay->addWidget(myXSpin, 0, 1);
 
-    connect(myXSpin, SIGNAL(valueChanged(const QString&)), this, SLOT(onValuesChanged()));
+    // Apply widget value change by enter/tab event.
+    //connect(myXSpin, SIGNAL(valueChanged(const QString&)), this, SLOT(onValuesChanged()));
+    connect(myXSpin, SIGNAL(editingFinished()), this, SLOT(onValuesChanged()));
   }
   {
     QLabel* aLabel = new QLabel(myGroupBox);
@@ -101,7 +103,9 @@ PartSet_WidgetPoint2D::PartSet_WidgetPoint2D(QWidget* theParent,
     myYSpin->setToolTip(tr("Y"));
     aGroupLay->addWidget(myYSpin, 1, 1);
 
-    connect(myYSpin, SIGNAL(valueChanged(const QString&)), this, SLOT(onValuesChanged()));
+    // Apply widget value change by enter/tab event.
+    //connect(myYSpin, SIGNAL(valueChanged(const QString&)), this, SLOT(onValuesChanged()));
+    connect(myYSpin, SIGNAL(editingFinished()), this, SLOT(onValuesChanged()));
   }
   QVBoxLayout* aLayout = new QVBoxLayout(this);
   ModuleBase_Tools::zeroMargins(aLayout);
index ee59d8aeef8744ec7f610029c6f6488f914c03f8..297727d4e57f314a049446147b8234ac0937b613 100644 (file)
@@ -34,8 +34,11 @@ PartSet_WidgetPoint2dDistance::PartSet_WidgetPoint2dDistance(QWidget* theParent,
   myFirstPntName = theData->getProperty("first_point");
 
   // Reconnect to local slot
-  disconnect(mySpinBox, SIGNAL(valueChanged(double)), this, SIGNAL(valuesChanged()));
-  connect(mySpinBox, SIGNAL(valueChanged(double)), this, SLOT(onValuesChanged()));
+  // Apply widget value change by enter/tab event.
+  //disconnect(mySpinBox, SIGNAL(valueChanged(double)), this, SIGNAL(valuesChanged()));
+  //connect(mySpinBox, SIGNAL(valueChanged(double)), this, SLOT(onValuesChanged()));
+  disconnect(mySpinBox, SIGNAL(editingFinished()), this, SIGNAL(valuesChanged()));
+  connect(mySpinBox, SIGNAL(editingFinished()), this, SLOT(onValuesChanged()));
 }
 
 PartSet_WidgetPoint2dDistance::~PartSet_WidgetPoint2dDistance()