Skip to content

Commit d0c31fb

Browse files
committed
Handle line styles with outline colors differently when setting a hilite color.
1 parent 0e2b1b3 commit d0c31fb

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

mapdraw.c

+9-1
Original file line numberDiff line numberDiff line change
@@ -1377,6 +1377,11 @@ int msDrawQueryLayer(mapObj *map, layerObj *layer, imageObj *image)
13771377
colorbuffer[i] = layer->class[i]->styles[0]->outlinecolor; /* if no color, save the outlinecolor from the BOTTOM style */
13781378
layer->class[i]->styles[0]->outlinecolor = map->querymap.color;
13791379
}
1380+
} else if (layer->type == MS_LAYER_LINE && layer->class[i]->numstyles > 0 && layer->class[i]->styles[0]->outlinewidth > 0) { /* alter BOTTOM style for lines with outlines */
1381+
if(MS_VALID_COLOR(layer->class[i]->styles[0]->color)) {
1382+
colorbuffer[i] = layer->class[i]->styles[0]->color; /* save the color from the BOTTOM style */
1383+
layer->class[i]->styles[0]->color = map->querymap.color;
1384+
} /* else ??? */
13801385
} else if (layer->class[i]->numstyles > 0) {
13811386
if(MS_VALID_COLOR(layer->class[i]->styles[layer->class[i]->numstyles-1]->color)) {
13821387
colorbuffer[i] = layer->class[i]->styles[layer->class[i]->numstyles-1]->color; /* save the color from the TOP style */
@@ -1388,7 +1393,7 @@ int msDrawQueryLayer(mapObj *map, layerObj *layer, imageObj *image)
13881393
} else if (layer->class[i]->numlabels > 0) {
13891394
colorbuffer[i] = layer->class[i]->labels[0]->color;
13901395
layer->class[i]->labels[0]->color = map->querymap.color;
1391-
}
1396+
} /* else ??? */
13921397

13931398
mindistancebuffer[i] = -1; /* RFC77 TODO: only using the first label, is that cool? */
13941399
if(layer->class[i]->numlabels > 0) {
@@ -1496,6 +1501,9 @@ int msDrawQueryLayer(mapObj *map, layerObj *layer, imageObj *image)
14961501
layer->class[i]->styles[0]->color = colorbuffer[i];
14971502
else if(MS_VALID_COLOR(layer->class[i]->styles[0]->outlinecolor))
14981503
layer->class[i]->styles[0]->outlinecolor = colorbuffer[i]; /* if no color, restore outlinecolor for the BOTTOM style */
1504+
} else if (layer->type == MS_LAYER_LINE && layer->class[i]->numstyles > 0 && layer->class[i]->styles[0]->outlinewidth > 0) {
1505+
if(MS_VALID_COLOR(layer->class[i]->styles[0]->color))
1506+
layer->class[i]->styles[0]->color = colorbuffer[i];
14991507
} else if (layer->class[i]->numstyles > 0) {
15001508
if(MS_VALID_COLOR(layer->class[i]->styles[layer->class[i]->numstyles-1]->color))
15011509
layer->class[i]->styles[layer->class[i]->numstyles-1]->color = colorbuffer[i];

0 commit comments

Comments
 (0)