dcs-liberation / dcs_liberation

DCS World dynamic campaign.
GNU Lesser General Public License v3.0
711 stars 185 forks source link

Map ruler tool doubles distance on double-click #3182

Open ali4000 opened 11 months ago

ali4000 commented 11 months ago

Affected versions

Development build

Build information

Present on 9.0.0-preview run from git as of today; has been present for several major releases

Description

There is a problem with the map ruler widget that causes it to double the measured distance when you double-click it to "detach" the pointer again. When you first extrude a line it shows the measured distance fine: first_click

Then, when you double click it to detach the pointer and stop making lines, the measured distance doubles: second_click

@Starfire13 discovered that if you zoom in very much, you can see there are actually two points and labels:

zoom

The problem appears to manifest itself with very different frequency for different users, so it might have something to do with mouse sensitivity. For me it happens more than 90% of the time, it's hard to not reproduce it even if I firmly hold the mouse still. For others, it's instead hard to reproduce the error.

Save game and other files (save game required, bugs without saves will be closed)

No save game needed, this is a UI problem. Dummy save-file attached.

dummy.liberation.zip

Starfire13 commented 11 months ago

I was able to replicate the issue. I haven't been able to force it to occur, however, even if I deliberately try to do bad double-clicks (different click rates, moving mouse, etc). It just seems to spontaneously pop up at some point. And once it does, it appears to then occur consistently from that point on until the ruler tool is toggled off. It does not appear to happen as often on my end as it does on Ali's (definitely not 90% of the time here).

Screenshot 2023-10-03 231438

DanAlbert commented 11 months ago

Aiui the ruler tool was abandoned upstream (we didn't make that) years ago, and it's not likely something we'll fix ourselves. I'll leave this open for a bit in case someone wants to do that or wants to find a replacement (but it's not the first problem we've had with it and we didn't find a suitable replacement last time either), but it's probably just going to get closed.