]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #2403: Avoid activation of Apply button on Name widget edit
authorvsv <vsv@opencascade.com>
Wed, 17 Jan 2018 12:44:54 +0000 (15:44 +0300)
committervsv <vsv@opencascade.com>
Wed, 17 Jan 2018 12:45:04 +0000 (15:45 +0300)
src/ModuleBase/ModuleBase_WidgetNameEdit.cpp
src/ModuleBase/ModuleBase_WidgetNameEdit.h

index 9261f6f27868c49c964655caf44f15c5440bd11f..9684eb79b60f615134c20408953463740965206d 100644 (file)
 
 #include <QLineEdit>
 
+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)
index ba090c4ab61656df61c7e30293f6127980a75a0c..5dda6b77eace088f87a4a9d72c14606ce5990394 100644 (file)
@@ -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.