Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#1342 closed defect/bug (fixed)

"Set distance to" in POI search results is no longer clickable

Reported by: mvglasow (2) Owned by: cp15
Priority: major Milestone:
Component: gui/internal Version:
Severity: normal Keywords:
Cc: sebastian.leske@…

Description

When trying to extend the search range for POIs, the distances are no longer clickable. Instead, the entire line is highlighted and nothing else happens.

All platforms seem to be affected (tested on Linux and Android).

Bisecting revealed that the bug was introduced with commit 8bdcd53: Add:gui_internal:Navigating menus with rotary encoder.navit_distance_bug.png

Attachments (1)

navit_distance_bug.png (31.4 KB) - added by mvglasow (2) 5 years ago.
navit_distance_bug.png

Download all attachments as: .zip

Change History (8)

Changed 5 years ago by mvglasow (2)

navit_distance_bug.png

comment:1 Changed 5 years ago by mvglasow (2)

Steps to reproduce:

  • Click on the map.
  • From the menu, select Actions > Map Coordinates > POIs.
  • Select a POI type (preferably a type that is rare in the immediate surroundings, e.g. mountain)
  • Try to change the search radius by clicking one of the numbers after "Set distance to".

comment:2 Changed 5 years ago by mvglasow (2)

Just tested again: with the arrow keys, it is still possible to select individual distances, whereas PgUp/PgDn? will also select the entire row. If I understand that correctly, rotary encoders would also be affected by this bug.

comment:3 Changed 5 years ago by mvglasow (2)

Also affected: "Get more (up to nnn items)" at the end of the result list. Here the click event is sent to the background instead of the text.

comment:4 Changed 5 years ago by sleske

Yes, I can confirm this with the latest version. Thanks for bisecting it, that makes it easier. I'll look into this.

comment:5 Changed 5 years ago by sleske

This is indeed a bug caused by the changes to support rotary encoders (PR #5). The code disables and re-enables menu items depending on visibility (in gui_internal_widget.c:gui_internal_table_render()), and that messes up the "Set distance to" and "Get more" menu items, because these two are structured differently from the normal POI entries (specifically, they have clickable parts, rather than being clickable themselves).

I'll think about how to best solve this, without completely reverting the support for rotary encoders.

comment:6 Changed 5 years ago by sleske

  • Resolution set to fixed
  • Status changed from new to closed

Fixed, by toggling STATE_OFFSCREEN instead of STATE_SENSITIVE for hidden menu entries. Commit dce47eec6.

comment:7 Changed 5 years ago by sleske

  • Cc sebastian.leske@… added
Note: See TracTickets for help on using tickets.