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

Reload project following download of updated .qgz file #617

Closed
volcan01010 opened this issue Sep 13, 2024 · 2 comments · Fixed by #632
Closed

Reload project following download of updated .qgz file #617

volcan01010 opened this issue Sep 13, 2024 · 2 comments · Fixed by #632
Assignees
Labels
bug Something isn't working test - success
Milestone

Comments

@volcan01010
Copy link

Summary

As a Mergin Maps user, I would like the plugin to reload the QGIS project when a new version of the .qgz file has been downloaded, so that I see changes that have been made by other users.

Description

Consider this scenario:

  • User 1 (Writer permissions) and User 2 (Editor permissions) both synchronise and have identical projects.
  • User 1 adds a geotiff with an aerial photo to the project folder and adds it as a layer in the project so it displays on the map.
  • User 1 saves the project and syncs the files.
  • User 2 presses "syncronise". The dialog says that there are changes to the .qgz file. They press OK.

What happens:

  • The geotiff is downloaded to User 2's laptop and the plugin reports successful synchronisation.
  • The aerial photo does not appear on the map.
  • If User 2 closes and re-opens the project, then the aerial photo appears.

What should happen:

  • The project is reloaded so that the aerial photo appears as part of the synchronisation process

Related issues

#592

Plugin version: 2024.2

@volcan01010
Copy link
Author

Alternatively, as you may not want to immediately reload in case the user has unsaved local changes, would be to pop up a QMessageBox with:

"A new version of the xxxxxx.qgz project settings file was retrieved from the server. Would you like to use it now?"

That way users could select 'OK' to reload, or 'Cancel' to make whatever change they want locally.

@ValentinBuira
Copy link
Contributor

I can confirm the bug with editor permission. It should reload the QGIS project even if you don't have write permission, as it currently happening with writer permission

Note for dev : I also found an other case were the after a sync that might have the same root issue: after changing only the legend the qgis project does not reload after a sync even with appropriate permission

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working test - success
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants