Open matthijskooijman opened 2 years ago
It seems this is not 100% reproducible. I tested this with both OpenCPN and o-charts built from git, running in portable mode with a mostly clean config, and then could not reproduce the problem. Copying my regular opencpn.conf
, the problem did occur, so I suspected something in my config to cause this, but then slowly changing the config back to the mostly clean config, I could not find any clear cause, and then with the mostly clean config, the problem occurred again.
To verify, I started again with a fully clean config, installed the o-charts plugin, downloaded the NL_BE charts and could reproduce the problem again.
I wanted to further diagnose this by modifying the rendering code to draw the bounding boxes used for hittesting, but I'm not familiar enough with GL rendering, especially with various transformations involved, so after looking around the code a bit, I did not really try.
Hopefully others can reproduce this problem, and someone more familiar with the code can diagnose and fix it :-)
While using ocharts with the oeuSENC-NL_BE charts, I noticed that sometimes double-clicking a buoy returned info on mutliple nearby buoys. Because objects are returned based on their bounding box (including any label), this is sometimes expected (though sometimes confusing, but I opened https://github.com/OpenCPN/OpenCPN/issues/2712 about making sure the object clicked is actually shown at the top always).
For regular ENC charts, the behavior is what I expected based on (what I think are) the bounding boxes. However, for o-charts, I sometimes see objects returned that should not be based on (what I think is) their bounding box.
For example, with the Netherlands & Belgium chart (oeuSENC-NL_BE), around 53° 02.2163' N / 004° 51.3733' E at 1:10000 (1:9400 and 1:11000) also worked, clicking the OS2 buoy also returns info for the T12 buoy, whose bounding box I would expect to end to the left of the "T12" label, which is sufficiently far away from the click point to not be returned:
Interestingly, when I restart OpenCPN, the problem no longer occurs, but when I change the zoom and back (i.e. press - and then +), the problem does occur. Also, clicking quite a bit above (around the 291 deg label) or to the left of the T12 label also shows that buoy in the list. It seems a bit like the bounding box of the T12 label is bigger than it should be, while the bounding box of the icon is as expected.
This was tested using OpenCPN 5.6.1 and o-charts 1.0.25.0.