From: vsv Date: Fri, 22 Apr 2016 09:39:25 +0000 (+0300) Subject: Issue #1428: Find referenced feature by parameters recursive X-Git-Tag: V_2.3.0~138 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=34bba72fdff39dcede8e8bae1a5a7f8e67e8b14b;p=modules%2Fshaper.git Issue #1428: Find referenced feature by parameters recursive --- diff --git a/src/ParametersPlugin/ParametersPlugin_WidgetParamsMgr.cpp b/src/ParametersPlugin/ParametersPlugin_WidgetParamsMgr.cpp index 508303bba..81a06e84f 100644 --- a/src/ParametersPlugin/ParametersPlugin_WidgetParamsMgr.cpp +++ b/src/ParametersPlugin/ParametersPlugin_WidgetParamsMgr.cpp @@ -269,21 +269,29 @@ QList ParametersPlugin_WidgetParamsMgr:: std::shared_ptr aAttr = (*aIt); FeaturePtr aReferenced = std::dynamic_pointer_cast(aAttr->owner()); if (aReferenced.get()) { - QStringList aValNames; - aValNames << aReferenced->data()->name().c_str(); - - AttributeDoublePtr aDouble = std::dynamic_pointer_cast(aAttr); - if (aDouble.get()) { - aValNames << aDouble->text().c_str(); - aValNames << QString::number(aDouble->value()); + if (aReferenced->getKind() == ParametersPlugin_Parameter::ID()) { + // Find referenced feature Recursive + QList aList; + aList.append(aReferenced); + QList aItems = featuresItems(aList); + aItemsList.append(aItems); } else { - AttributeIntegerPtr aInt = std::dynamic_pointer_cast(aAttr); - if (aInt.get()) { - aValNames << aInt->text().c_str(); - aValNames << QString::number(aInt->value()); + QStringList aValNames; + aValNames << aReferenced->data()->name().c_str(); + + AttributeDoublePtr aDouble = std::dynamic_pointer_cast(aAttr); + if (aDouble.get()) { + aValNames << aDouble->text().c_str(); + aValNames << QString::number(aDouble->value()); + } else { + AttributeIntegerPtr aInt = std::dynamic_pointer_cast(aAttr); + if (aInt.get()) { + aValNames << aInt->text().c_str(); + aValNames << QString::number(aInt->value()); + } } + aItemsList.append(aValNames); } - aItemsList.append(aValNames); } } }