Maproom / qmapshack

Consumer grade GIS software
GNU General Public License v3.0
298 stars 64 forks source link

Selected layer in the multilayer TSM map must be selected after reloading maps. #656

Closed Phobooky closed 10 months ago

Phobooky commented 11 months ago

Describe the bug

Since version 1.17 I have noticed that when a map reload is done, the TSM multilayer map layers are left unselected. That is, if in a TSM multilayer map I had one or some certain layers selected, when I reload the maps, none of the layers are selected. This is a small nuisance because every time I reload maps, I have to select all the layers of the multilayer maps again in all the views. I have seen this modification [QMS-535] "Loading a map view does not reset the layer checkboxes" which I don't know if it has to do with what I am commenting on. From my point of view, loading a map that already exists should not reset (deselect) the layer checkboxes.

What have you done to circle down the problem?

Nothing can be done.

To Reproduce

  1. Go to maps area.
  2. Select a layer in a multilayer TSM map.
  3. Reload maps (right click)
  4. See error: The selected layer in the multilayer TSM map is already not selected.

Expected behavior

The selected layer in the multilayer TSM map must be selected after reloading maps.

Screenshots

N/A

Attachments

N/A

Tracebacks

N/A

Desktop

kiozen commented 11 months ago

Tried this with the multi-layer Google map. Works as expected. Activate the map. Select a layer, Reload map list. The layer is still selected and displayed.

Phobooky commented 11 months ago

I have noticed a peculiarity, Please, try that: Activate the map. Select a layer, Reload map list. The layer is still selected and displayed. OK Reload again. The layer is already not selected. I have found out that the problem arises when recharging maps from the second time.

frankystone commented 11 months ago

I can also not reproduce with waymarkedtrails.tms (i guess TSM is a misspelling?) Also reloading the maps several times the checked layers are checked.

I wonder why Phobooky needs to reload all the maps so often. Normally this is only needed if a new map is installed, or am i wrong?

Phobooky commented 11 months ago

If you can't reproduce it, I try to find more use cases. In any case, and in response to @frankystone I would say that it happens to me with Google and Nakarte. I am attaching the one from Google to test. In response to the reason that I need to do map reloads very frequently, it is because I systematically generate a HeatMap of my routes and obviously, it needs a reload every time I generate it. And I do routes daily. Google.tms.txt

mitxel-m commented 11 months ago

I can't reproduce it either. I've tried waymarkedtrails, google and nakarte, on linux and windows, with the latest version 1.17.1.

Phobooky commented 11 months ago

I have to test more to give you a use case because sometimes I try and I get the problem and sometimes it works perfectly for me.

Phobooky commented 11 months ago

I attach you in the video where you can see a use case of the problem. It starts with a clean installation of QMS 1.17.1. A route is configured to a maps folder that only has the Google TSM file attached in a previous post. As seen in the video, when you reload Maps, only the yellow background is visible. The image is no longer visible despite the check being marked. If a reload is made again, the check is deactivated. If after the first reload in which the image is not visible, you uncheck it and then mark the check again, you will see the image again. From here the process begins again, that is, with the next recharge the Google map will no longer be visible and with the second the check will be unchecked.

https://github.com/Maproom/qmapshack/assets/24461946/d0df76e0-e26f-42d3-853d-614689991761

Phobooky commented 11 months ago

I have detected that the problem only occurs with the first layer. If the entire protocol described above is done with another layer, the operation is correct. Therefore, a possible workaround is to duplicate the first layer and not use it.

kiozen commented 11 months ago

That's the crucial hint. I can confirm the bug. Hope I find the time to fix it the next days.

Phobooky commented 10 months ago

Sorry for the trouble of asking. I wanted to know if there is any plan to release a version with this issue corrected. Thank you and Happy New Year.

kiozen commented 10 months ago

Might take some time. My spare time is very limited.

kiozen commented 10 months ago

Can someone test the PR and verify that the issue is fixed?

mitxel-m commented 10 months ago

Tested and working for me.

Now the 1st layer is displayed after reload.

kiozen commented 10 months ago

Thanks for testing

Phobooky commented 10 months ago

Do you know if there will be a compilation on Windows after the PR?