Salome HOME
Fix for the issue #370 : activization of updater only once per undo/redo for all...
[modules/shaper.git] / src / Model / Model_AttributeSelection.cpp
index 003fb28e9912227a90e23a41680f331e8ab7b333..ca0653fcc2ac05c0be6e13f45d6c37a2d525b372 100644 (file)
@@ -118,7 +118,8 @@ void Model_AttributeSelection::setValue(const ResultPtr& theContext,
       selectConstruction(theContext, theSubShape);
     }
   }
-  myIsInitialized = true;
+  //the attribute initialized state should be changed by sendAttributeUpdated only
+  //myIsInitialized = true;
 
   std::string aSelName = namingName();
   if(!aSelName.empty())
@@ -136,7 +137,7 @@ void Model_AttributeSelection::setValue(const ResultPtr& theContext,
 std::shared_ptr<GeomAPI_Shape> Model_AttributeSelection::value()
 {
   std::shared_ptr<GeomAPI_Shape> aResult;
-  if (myIsInitialized) {
+  if (myRef.isInitialized()) {
     TDF_Label aSelLab = selectionLabel();
     if (aSelLab.IsAttribute(kSIMPLE_REF_ID)) { // it is just reference to shape, not sub-shape
       ResultPtr aContext = context();