From 214434b3f4710b32a3a03c8148cc61ed777e4677 Mon Sep 17 00:00:00 2001 From: vsv Date: Wed, 17 Jan 2018 15:44:54 +0300 Subject: [PATCH] Issue #2403: Avoid activation of Apply button on Name widget edit --- src/ModuleBase/ModuleBase_WidgetNameEdit.cpp | 12 ++++++++++++ src/ModuleBase/ModuleBase_WidgetNameEdit.h | 3 +-- 2 files changed, 13 insertions(+), 2 deletions(-) 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. -- 2.39.2