From: vsv Date: Wed, 17 Jan 2018 12:44:54 +0000 (+0300) Subject: Issue #2403: Avoid activation of Apply button on Name widget edit X-Git-Tag: V_3.0.0RC1~25^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=214434b3f4710b32a3a03c8148cc61ed777e4677;p=modules%2Fshaper.git Issue #2403: Avoid activation of Apply button on Name widget edit --- diff --git a/src/ModuleBase/ModuleBase_WidgetNameEdit.cpp b/src/ModuleBase/ModuleBase_WidgetNameEdit.cpp index 9261f6f27..9684eb79b 100644 --- a/src/ModuleBase/ModuleBase_WidgetNameEdit.cpp +++ b/src/ModuleBase/ModuleBase_WidgetNameEdit.cpp @@ -24,6 +24,18 @@ #include +ModuleBase_WidgetNameEdit::ModuleBase_WidgetNameEdit(QWidget* theParent, + const Config_WidgetAPI* theData, + const std::string& thePlaceHolder ) + : ModuleBase_WidgetLineEdit(theParent, theData, thePlaceHolder) +{ + // Disconnect the signal in order to avoid Apply button activation automatically + // it will activate apply because of value isApplyEnabledByActiveWidget in + // XGUI_ErrorMgr::updateActions + disconnect(myLineEdit, SIGNAL(textChanged(const QString&)), this, SIGNAL(valuesModified())); +} + + bool ModuleBase_WidgetNameEdit::storeValueCustom() { if(!myFeature) diff --git a/src/ModuleBase/ModuleBase_WidgetNameEdit.h b/src/ModuleBase/ModuleBase_WidgetNameEdit.h index ba090c4ab..5dda6b77e 100644 --- a/src/ModuleBase/ModuleBase_WidgetNameEdit.h +++ b/src/ModuleBase/ModuleBase_WidgetNameEdit.h @@ -30,8 +30,7 @@ class ModuleBase_WidgetNameEdit : public ModuleBase_WidgetLineEdit public: ModuleBase_WidgetNameEdit( QWidget* theParent, const Config_WidgetAPI* theData, - const std::string& thePlaceHolder ) - : ModuleBase_WidgetLineEdit(theParent, theData, thePlaceHolder) {} + const std::string& thePlaceHolder ); /// Returns True if the widget uses feature attribute. /// If not then it means that the widget do not need attribute at all.