From: nds Date: Tue, 6 Oct 2015 14:06:47 +0000 (+0300) Subject: Undoes of the previous modifications. X-Git-Tag: V_1.4.0_demo2~20 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d9e4a5c55cd75966968f9a35a4600ea9001e08d0;p=modules%2Fshaper.git Undoes of the previous modifications. --- diff --git a/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp b/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp index 8cf2d67cc..2687b72a2 100644 --- a/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp +++ b/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp @@ -31,6 +31,8 @@ #include #endif +//#define APPLY_BY_ENTER_OR_TAB + ModuleBase_WidgetDoubleValue::ModuleBase_WidgetDoubleValue(QWidget* theParent, const Config_WidgetAPI* theData, const std::string& theParentId) @@ -85,9 +87,12 @@ ModuleBase_WidgetDoubleValue::ModuleBase_WidgetDoubleValue(QWidget* theParent, mySpinBox->setToolTip(aTTip); aControlLay->addRow(myLabel, mySpinBox); +#ifdef APPLY_BY_ENTER_OR_TAB // Apply widget value change by enter/tab event. - //connect(mySpinBox, SIGNAL(valueChanged(const QString&)), this, SIGNAL(valuesChanged())); connect(mySpinBox, SIGNAL(editingFinished()), this, SIGNAL(valuesChanged())); +#else + connect(mySpinBox, SIGNAL(valueChanged(const QString&)), this, SIGNAL(valuesChanged())); +#endif } ModuleBase_WidgetDoubleValue::~ModuleBase_WidgetDoubleValue() diff --git a/src/ModuleBase/ModuleBase_WidgetIntValue.cpp b/src/ModuleBase/ModuleBase_WidgetIntValue.cpp index 622600ee2..54e737c11 100644 --- a/src/ModuleBase/ModuleBase_WidgetIntValue.cpp +++ b/src/ModuleBase/ModuleBase_WidgetIntValue.cpp @@ -34,6 +34,8 @@ #include #endif +//#define APPLY_BY_ENTER_OR_TAB + ModuleBase_WidgetIntValue::ModuleBase_WidgetIntValue(QWidget* theParent, const Config_WidgetAPI* theData, const std::string& theParentId) @@ -84,9 +86,12 @@ ModuleBase_WidgetIntValue::ModuleBase_WidgetIntValue(QWidget* theParent, mySpinBox->setToolTip(aTTip); aControlLay->addRow(myLabel, mySpinBox); +#ifdef APPLY_BY_ENTER_OR_TAB // Apply widget value change by enter/tab event. - //connect(mySpinBox, SIGNAL(valueChanged(int)), this, SIGNAL(valuesChanged())); connect(mySpinBox, SIGNAL(editingFinished()), this, SIGNAL(valuesChanged())); +#else + connect(mySpinBox, SIGNAL(valueChanged(int)), this, SIGNAL(valuesChanged())); +#endif } ModuleBase_WidgetIntValue::~ModuleBase_WidgetIntValue() diff --git a/src/PartSet/PartSet_WidgetPoint2d.cpp b/src/PartSet/PartSet_WidgetPoint2d.cpp index 3e25988eb..bb75fd068 100644 --- a/src/PartSet/PartSet_WidgetPoint2d.cpp +++ b/src/PartSet/PartSet_WidgetPoint2d.cpp @@ -52,6 +52,8 @@ const double MaxCoordinate = 1e12; static QStringList MyFeaturesForCoincedence; +//#define APPLY_BY_ENTER_OR_TAB + PartSet_WidgetPoint2D::PartSet_WidgetPoint2D(QWidget* theParent, ModuleBase_IWorkshop* theWorkshop, const Config_WidgetAPI* theData, @@ -88,9 +90,12 @@ PartSet_WidgetPoint2D::PartSet_WidgetPoint2D(QWidget* theParent, myXSpin->setToolTip(tr("X")); aGroupLay->addWidget(myXSpin, 0, 1); +#ifdef APPLY_BY_ENTER_OR_TAB // Apply widget value change by enter/tab event. - //connect(myXSpin, SIGNAL(valueChanged(const QString&)), this, SLOT(onValuesChanged())); connect(myXSpin, SIGNAL(editingFinished()), this, SLOT(onValuesChanged())); +#else + connect(myXSpin, SIGNAL(valueChanged(const QString&)), this, SLOT(onValuesChanged())); +#endif } { QLabel* aLabel = new QLabel(myGroupBox); @@ -103,9 +108,12 @@ PartSet_WidgetPoint2D::PartSet_WidgetPoint2D(QWidget* theParent, myYSpin->setToolTip(tr("Y")); aGroupLay->addWidget(myYSpin, 1, 1); +#ifdef APPLY_BY_ENTER_OR_TAB // Apply widget value change by enter/tab event. - //connect(myYSpin, SIGNAL(valueChanged(const QString&)), this, SLOT(onValuesChanged())); connect(myYSpin, SIGNAL(editingFinished()), this, SLOT(onValuesChanged())); +#else + connect(myYSpin, SIGNAL(valueChanged(const QString&)), this, SLOT(onValuesChanged())); +#endif } QVBoxLayout* aLayout = new QVBoxLayout(this); ModuleBase_Tools::zeroMargins(aLayout); diff --git a/src/PartSet/PartSet_WidgetPoint2dDistance.cpp b/src/PartSet/PartSet_WidgetPoint2dDistance.cpp index 297727d4e..a644d55cc 100644 --- a/src/PartSet/PartSet_WidgetPoint2dDistance.cpp +++ b/src/PartSet/PartSet_WidgetPoint2dDistance.cpp @@ -23,6 +23,8 @@ #include +//#define APPLY_BY_ENTER_OR_TAB + PartSet_WidgetPoint2dDistance::PartSet_WidgetPoint2dDistance(QWidget* theParent, ModuleBase_IWorkshop* theWorkshop, const Config_WidgetAPI* theData, @@ -34,11 +36,14 @@ PartSet_WidgetPoint2dDistance::PartSet_WidgetPoint2dDistance(QWidget* theParent, myFirstPntName = theData->getProperty("first_point"); // Reconnect to local slot +#ifdef APPLY_BY_ENTER_OR_TAB // 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())); +#else + disconnect(mySpinBox, SIGNAL(valueChanged(double)), this, SIGNAL(valuesChanged())); + connect(mySpinBox, SIGNAL(valueChanged(double)), this, SLOT(onValuesChanged())); +#endif } PartSet_WidgetPoint2dDistance::~PartSet_WidgetPoint2dDistance()