From df65199c64b66949f428cf92ec8e01cdf8290bdd Mon Sep 17 00:00:00 2001 From: nds Date: Thu, 20 Aug 2015 12:21:06 +0300 Subject: [PATCH] Debug corrections for: deselect objects when multi-selection control is active. --- src/Model/Model_AttributeRefList.cpp | 1 + src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp | 2 -- src/SketchPlugin/SketchPlugin_ConstraintMirror.cpp | 3 +++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Model/Model_AttributeRefList.cpp b/src/Model/Model_AttributeRefList.cpp index 01e288ab9..b29612521 100644 --- a/src/Model/Model_AttributeRefList.cpp +++ b/src/Model/Model_AttributeRefList.cpp @@ -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 diff --git a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp index a7025605a..0af14a955 100755 --- a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp @@ -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 } } diff --git a/src/SketchPlugin/SketchPlugin_ConstraintMirror.cpp b/src/SketchPlugin/SketchPlugin_ConstraintMirror.cpp index 5691e6c7f..371830c76 100755 --- a/src/SketchPlugin/SketchPlugin_ConstraintMirror.cpp +++ b/src/SketchPlugin/SketchPlugin_ConstraintMirror.cpp @@ -216,6 +216,9 @@ void SketchPlugin_ConstraintMirror::attributeChanged(const std::string& theID) if (aFeature) aDoc->removeFeature(aFeature); } + aRefListOfMirrored->clear(); + std::dynamic_pointer_cast( + data()->attribute(SketchPlugin_Constraint::ENTITY_B()))->clear(); } } } -- 2.39.2