Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh map data after opening / closing settings dialog #15659

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

murggel
Copy link
Contributor

@murggel murggel commented Apr 22, 2024

Description

With my limited understanding of the BackgroundHandler and loading caches - but with debugging and trying:
If no loadInBackgroundHandler is set, then the caches / waypoints have to be reloaded via reloadCachesAndWaypoints to adapt to the possible changes made in the settings-popup.
Reloading and recreating the loadInBackgroundHandler is only done, if the relevant settings have changed.
Therefore I enhanced the SettingsCheckboxModel with the possibility to get that information.

Related issues

fix #15611
fix #15614
fix #15661

Additional context

@murggel
Copy link
Contributor Author

murggel commented Apr 22, 2024

@eddiemuc / @moving-bits please check if my assumption and fix is correct

@ztNFny
Copy link
Contributor

ztNFny commented Apr 23, 2024

Could you trigger the reload only if a relevant setting has changed? Changing e.g. navigation mode shouldn't trigger the reload.

@murggel
Copy link
Contributor Author

murggel commented Apr 23, 2024

Could you trigger the reload only if a relevant setting has changed? Changing e.g. navigation mode shouldn't trigger the reload.

Thought about that already, but the only changed-info is about the circles.
For live map the LoadInbackgroundHandler.load is also called, if nothing changed, but there is some mechanism with useLastSearch, but even this is false, if the pop-up is closed without a change.

I will try, if I can find an easy way to transport/ transfer the information, if a setting is changed, which needs to update the map-data...

@murggel
Copy link
Contributor Author

murggel commented Apr 23, 2024

Probably I can check the resulting filter....

@murggel
Copy link
Contributor Author

murggel commented Apr 24, 2024

I tried to check, if the relevant checkboxes changed values and only in this case reload the caches / trigger a new search

@murggel
Copy link
Contributor Author

murggel commented Apr 30, 2024

@eddiemuc / @moving-bits can someone has a look on it please...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants