Skip to content

Commit

Permalink
Update maximum atlas feature to 1 at least when saving CFG file
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry committed Dec 4, 2023
1 parent 42bc87f commit 0025a41
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Unreleased

* Increase to 1 the maximum of atlas features in a `GetPrint` request automatically
* Fix some columns in the "Filter by form" panel
* Add a notice if the layer is stored in PostgreSQL when setting up the "Locate by layer" tool
* Add a link to PgService documentation on qgis.org website
Expand Down
5 changes: 5 additions & 0 deletions lizmap/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -3073,6 +3073,11 @@ def project_config_file(
self.dlg.check_results.add_error(Error(Path(self.project.fileName()).name, Checks.TrustProject))
self.dlg.enabled_trust_project(True)

# Not blocking, we change it in the background
if self.project.readNumEntry("WMSMaxAtlasFeatures", '')[0] <= 0:
LOGGER.info("The maximum atlas features was less than '1'. We set it to '1' to at least have a value.")
self.project.writeEntry("WMSMaxAtlasFeatures", "/", 1)

self.dlg.check_results.sort()

if with_gui and self.dlg.check_results.has_rows():
Expand Down

0 comments on commit 0025a41

Please sign in to comment.