Permalink
Browse files

Update symbol references in labelcache when removing a symbol (#4656)

  • Loading branch information...
szekerest committed Feb 1, 2015
1 parent 92289a7 commit 8ffb75cbfc02123f443647d8dc2d9f88ef9ba053
Showing with 15 additions and 0 deletions.
  1. +15 −0 mapsymbol.c
View
@@ -805,6 +805,21 @@ symbolObj *msRemoveSymbol(symbolSetObj *symbolset, int nSymbolIndex)
}
}
}
+ /* Update symbol references in labelcache */
+ for(c = 0; c < MS_MAX_LABEL_PRIORITY; c++) {
+ labelCacheSlotObj *cacheslot = &(symbolset->map->labelcache.slots[c]);
+ for(l = 0; l < cacheslot->numlabels; l++) {
+ labelCacheMemberObj *cachePtr = &(cacheslot->labels[l]);
+ for(lb = 0; lb < cachePtr->numtextsymbols; lb++) {
+ label = cachePtr->textsymbols[lb]->label;
+ for (s = 0; s < label->numstyles; s++) {
+ style = label->styles[s];
+ if (style->symbol >= nSymbolIndex)
+ --style->symbol;
+ }
+ }
+ }
+ }
}
return symbol;
}

0 comments on commit 8ffb75c

Please sign in to comment.