From: nds Date: Thu, 28 Apr 2016 12:15:03 +0000 (+0300) Subject: Issue #1037 : using of: implementation of cashing of values for method isInList X-Git-Tag: V_2.3.0~78 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a7d14abb021ae8148fc317112a23ff37b32dca48;p=modules%2Fshaper.git Issue #1037 : using of: implementation of cashing of values for method isInList --- diff --git a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp index 7a187e57c..fa5d77675 100755 --- a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp @@ -220,6 +220,12 @@ bool ModuleBase_WidgetMultiSelector::restoreValueCustom() bool ModuleBase_WidgetMultiSelector::setSelection(QList& theValues, const bool theToValidate) { + AttributeSelectionListPtr aSelectionListAttr; + if (attribute()->attributeType() == ModelAPI_AttributeSelectionList::typeId()) + aSelectionListAttr = std::dynamic_pointer_cast(attribute()); + if (aSelectionListAttr.get()) + aSelectionListAttr->cashValues(true); + /// remove unused objects from the model attribute. /// It should be performed before new attributes append. removeUnusedAttributeObjects(theValues); @@ -261,6 +267,9 @@ bool ModuleBase_WidgetMultiSelector::setSelection(QList //emit valuesChanged(); //} + if (aSelectionListAttr.get()) + aSelectionListAttr->cashValues(false); + theValues.clear(); if (!anInvalidValues.empty()) theValues.append(anInvalidValues);