Salome HOME
Merge branch 'Dev_0.7.1' of newgeom:newgeom into Dev_0.7.1
[modules/shaper.git] / src / ModuleBase / ModuleBase_ModelWidget.cpp
index 5ca4cd03bd886d764b7ff778751bc2db152cc156..6a5421549ff74845da9a60dca29fd6257a54761d 100644 (file)
@@ -27,6 +27,7 @@ ModuleBase_ModelWidget::ModuleBase_ModelWidget(QWidget* theParent, const Config_
     : QObject(theParent),
       myParentId(theParentId)
 {
+  myIsValueDefault = !theData->getProperty(ATTR_DEFAULT).empty();
   myIsComputedDefault = false;
   myAttributeID = theData ? theData->widgetId() : "";
 }
@@ -84,7 +85,6 @@ bool ModuleBase_ModelWidget::focusTo()
   return true;
 }
 
-
 void ModuleBase_ModelWidget::updateObject(ObjectPtr theObj) const
 {
   Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_UPDATED));
@@ -92,6 +92,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);