From d1abc3e2fa3772350ca56e2714050a3e7e7a92cb Mon Sep 17 00:00:00 2001 From: vsv Date: Fri, 26 Jul 2019 12:46:33 +0300 Subject: [PATCH] Fix for creation of a step presentation with Part selection type --- src/PartSet/PartSet_FieldStepPrs.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/PartSet/PartSet_FieldStepPrs.cpp b/src/PartSet/PartSet_FieldStepPrs.cpp index 8fb605186..04c38b959 100644 --- a/src/PartSet/PartSet_FieldStepPrs.cpp +++ b/src/PartSet/PartSet_FieldStepPrs.cpp @@ -98,13 +98,17 @@ QList PartSet_FieldStepPrs::range(double& theMin, double& theMax) const { ModelAPI_AttributeTables::ValueType aType = dataType(); DataPtr aData = myFeature->data(); + AttributeSelectionListPtr aSelList = aData->selectionList(CollectionPlugin_Field::SELECTED_ID()); + std::string aTypeStr = aSelList->selectionType(); + int aStep = myStep->id(); AttributeTablesPtr aTablesAttr = aData->tables(CollectionPlugin_Field::VALUES_ID()); int aRows = aTablesAttr->rows(); int aCols = aTablesAttr->columns(); QList aFieldStepData; - for (int k = 1; k < aRows; k++) { // Do not use default values + int aStart = (aTypeStr == "part")? 0:1; + for (int k = aStart; k < aRows; k++) { // Do not use default values for (int j = 0; j < aCols; j++) { ModelAPI_AttributeTables::Value aVal = aTablesAttr->value(k, j, aStep); switch (aType) { -- 2.39.2