Skip to content

Commit

Permalink
Update symbol references in labelcache when removing a symbol (MapSer…
Browse files Browse the repository at this point in the history
  • Loading branch information
szekerest committed Feb 1, 2015
1 parent 92289a7 commit 8ffb75c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions mapsymbol.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 8ffb75c

Please sign in to comment.