Salome HOME
Example "PythonFeatures" plugin removed
[modules/shaper.git] / src / ModuleBase / ModuleBase_ModelWidget.cpp
index dde892d224818d1606bbbf003c74fb512e192081..79b00dfe2071fb892d6c3d3799377ad17f3ac438 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
 // File:        ModuleBase_ModelWidget.h
 // Created:     25 Apr 2014
 // Author:      Natalia ERMOLAEVA
@@ -26,7 +28,6 @@ ModuleBase_ModelWidget::ModuleBase_ModelWidget(QWidget* theParent, const Config_
       myParentId(theParentId)
 {
   myIsComputedDefault = false;
-  myIsObligatory = theData ? theData->getBooleanAttribute(FEATURE_OBLIGATORY, true) : true;
   myAttributeID = theData ? theData->widgetId() : "";
 }
 
@@ -83,7 +84,6 @@ bool ModuleBase_ModelWidget::focusTo()
   return true;
 }
 
-
 void ModuleBase_ModelWidget::updateObject(ObjectPtr theObj) const
 {
   Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_UPDATED));
@@ -91,6 +91,13 @@ void ModuleBase_ModelWidget::updateObject(ObjectPtr theObj) const
   ModelAPI_EventCreator::get()->sendUpdated(theObj, anEvent);
 }
 
+void ModuleBase_ModelWidget::moveObject(ObjectPtr theObj) const
+{
+  static Events_ID anEvent = Events_Loop::eventByName(EVENT_OBJECT_MOVED);
+  ModelAPI_EventCreator::get()->sendUpdated(theObj, anEvent);
+  Events_Loop::loop()->flush(anEvent);
+}
+
 bool ModuleBase_ModelWidget::eventFilter(QObject* theObject, QEvent *theEvent)
 {
   QWidget* aWidget = qobject_cast<QWidget*>(theObject);