Skip to content

Commit 38f3fc3

Browse files
committed
MWGIS-236; ApplyExpression for single Category was not working
1 parent a68c9b9 commit 38f3fc3

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/COM classes/ShapefileCategories.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -617,11 +617,11 @@ void CShapefileCategories::ApplyExpressionCore(long CategoryIndex, long startRow
617617
// Saving results
618618
// -------------------------------------------------------------
619619
for (unsigned long i = 0; i < results.size(); i++) {
620-
// Is this a category we need?
621-
if (!allCategories && i != CategoryIndex)
620+
// Is this a category we need?
621+
const int categoryIndex = results[i];
622+
if (!allCategories && categoryIndex != CategoryIndex)
622623
continue;
623624

624-
const int categoryIndex = results[i];
625625
const int rowIndex = startRowIndex + i;
626626
_shapefile->put_ShapeCategory(rowIndex, categoryIndex);
627627
_shapefile->put_ShapeRotation(rowIndex, rotations[categoryIndex + 1][i]);

0 commit comments

Comments
 (0)