Opened 5 years ago

Last modified 5 years ago

#1357 new defect/bug

gtk Display->Follow Vehicle checkmark set when follow_cursor set to 0.

Reported by: Owned by: cp15
Priority: minor Milestone:
Component: gui/gtk Version: git master
Severity: normal Keywords: gtk follow vehicle checkmark check


In GTK, the menu entry Display->Follow Vehicle determines whether the map should follow the current vehicle. Toggle it, and the check mark appears and disappears as appropriate.

There is an attribute to <navit ... > that sets this function, follow_cursor. Leave the attribute out of the tag (the default) and everything works fine. Add it and set it to 0 (no following), and the map indeed does not follow the vehicle. However, the check mark is incorrectly set.

Hit that menu entry, and the map still does not follow the vehicle, and the check mark is removed. Hit it again, and the map starts to follow, and the check mark shows up.

I added the menu entry for following (commit b004c7216c7c41a270cb08476538e96537a2b7da), but did not add any logic to check the state of the variable before indicating whether it should be checked or not. So that is probably what is wanted.

I have not tested for follow_vehicle present and set to one.

Change History (1)

comment:1 Changed 5 years ago by

It looks like the menu entries are initialized in add_menu (), at about line 490 of gui_gtk_actions.c. The code appears to loop through all the menu entries, and set each one up, with a default check on. As noted above, it ain't necessarily so.

What would it take to examine the XML file (actually the structure built from the XML file) for the associated attribute of each toggle menu entry?

Note: See TracTickets for help on using tickets.