]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Debug corrections for: deselect objects when multi-selection control is active.
authornds <natalia.donis@opencascade.com>
Thu, 20 Aug 2015 09:21:06 +0000 (12:21 +0300)
committernds <natalia.donis@opencascade.com>
Thu, 20 Aug 2015 09:44:44 +0000 (12:44 +0300)
src/Model/Model_AttributeRefList.cpp
src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp
src/SketchPlugin/SketchPlugin_ConstraintMirror.cpp

index 01e288ab9204a435353b046fec5ccc3e5c2705da..b296125212dd52807c1254ab1da6a3bf801dae57 100644 (file)
@@ -58,6 +58,7 @@ void Model_AttributeRefList::clear()
   for(; anOldIter != anOldList.end(); anOldIter++) {
     REMOVE_BACK_REF((*anOldIter));
   }
+  owner()->data()->sendAttributeUpdated(this);
 }
 
 int Model_AttributeRefList::size(const bool theWithEmpty) const
index a7025605a33498387f021540810e65fd46cfad20..0af14a9555727fc26a5a875aad1771ba077d0338 100755 (executable)
@@ -193,11 +193,9 @@ void ModuleBase_WidgetMultiSelector::restoreAttributeValue(bool theValid)
   else {
     AttributeRefListPtr aRefListAttr = myFeature->data()->reflist(attributeID());
     // restore objects in the attribute. Indeed there is only one stored object
-#ifdef DEBUG_REFLIST
     int aCountAppened = aRefListAttr->size() - mySelectionCount;
     for (int i = 0; i < aCountAppened; i++)
       aRefListAttr->removeLast();
-#endif
   }
 }
 
index 5691e6c7fb2e8ce7ce195bc980c34ba6c0fbedb9..371830c761471fb377899b28a46ab18599913f74 100755 (executable)
@@ -216,6 +216,9 @@ void SketchPlugin_ConstraintMirror::attributeChanged(const std::string& theID)
         if (aFeature)
           aDoc->removeFeature(aFeature);
       }
+      aRefListOfMirrored->clear();
+      std::dynamic_pointer_cast<ModelAPI_AttributeRefList>(
+        data()->attribute(SketchPlugin_Constraint::ENTITY_B()))->clear();
     }
   }
 }