X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_ModelWidget.cpp;h=6a5421549ff74845da9a60dca29fd6257a54761d;hb=a2982d2108f929cf9e7f996cfd590c4ce59dc21c;hp=5a6ba6e1eb5b8032feef6a283c3cc5e09b16c8c1;hpb=4fcd5da2d972334e887716499b0ea75d9d6c51c2;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_ModelWidget.cpp b/src/ModuleBase/ModuleBase_ModelWidget.cpp index 5a6ba6e1e..6a5421549 100644 --- a/src/ModuleBase/ModuleBase_ModelWidget.cpp +++ b/src/ModuleBase/ModuleBase_ModelWidget.cpp @@ -1,3 +1,5 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + // File: ModuleBase_ModelWidget.h // Created: 25 Apr 2014 // Author: Natalia ERMOLAEVA @@ -25,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() : ""; } @@ -82,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)); @@ -90,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(theObject);