public void FilterSelected(IFeatureSet sf) { int numShapes = sf.Table.NumRows; _filterMap = new int[sf.NumSelected]; _filterMask = new bool[numShapes]; int count = 0; for (int i = 0; i < numShapes; i++) { int realIndex = _sortingMap[i]; bool selected = sf.FeatureSelected(realIndex); if (selected) { _filterMap[count] = realIndex; _filterMask[realIndex] = true; count++; } } _filtered = true; }