Using: Viking 1.8 on Linux (32 bit)
Under some conditions, the Properties dialog for an existing waypoint will show the wrong waypoint symbol. Opening the properties dialog then clicking OK without changes will result in the waypoint symbol changing.
Reproduce steps:
If you switch the symbols - red and blue - and repeat, the bug does not appear. Explanation below.
Here is what I think is going on. Viking remembers the last used waypoint symbol, for use with new waypoints. When the properties dialog opens for an existing waypoint, Viking is supposed to show its current symbol. But it searches for a match on either "last used symbol" or "current symbol" in the list of valid symbols, and whichever matches first is used. Blue Flag is earlier in the list than Red Flag. So if "last used" happens to be Blue Flag, that gets incorrectly picked for a waypoint which has Red Flag as its current symbol.
I think the bug is in src/viktrwlayer_wpwin.c, function a_dialog_waypoint(), line 243:
if (sym && (!g_strcmp0(sym, wp->symbol) || !g_strcmp0(sym, last_sym))) {
It accepts a match with either current symbol, or last used symbol. I think maybe it should only accept a match with current symbol for existing waypoints, and with last used symbol for new waypoints.
Thanks for reporting this.
Agreed, it is a bit of logic failure in combining the tests in the single pass of available icons.
Needs to be separate checks as you suggest.
Here's a 1-line patch I tested and am now using with viking-1.8.
Patch applied to the mainline code base