Skip to content

Commit

Permalink
Remove wms restricted layouts. (#819) (#820)
Browse files Browse the repository at this point in the history
Co-authored-by: wlorenzetti <lorenzett@gis3w.it>
(cherry picked from commit 0e73d1d)

Co-authored-by: Walter Lorenzetti <lorenzetti@gis3w.it>
  • Loading branch information
github-actions[bot] and wlorenzetti committed Apr 19, 2024
1 parent 8b9bfec commit 23ee046
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion g3w-admin/qdjango/utils/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -1299,9 +1299,15 @@ def _getDataLayouts(self):
"""

layouts = []

# Get layouts excluded by WMS service
restricted_layouts = QgsServerProjectUtils.wmsRestrictedComposers(self.qgs_project)

qgs_layouts = self.qgs_project.layoutManager().layouts()

for qgs_layout in qgs_layouts:
if qgs_layout.layoutType() == QgsMasterLayoutInterface.PrintLayout:
if (qgs_layout.layoutType() == QgsMasterLayoutInterface.PrintLayout and
qgs_layout.name() not in restricted_layouts):

# find first page into items
first_page_size = qgs_layout.pageCollection().pages()[
Expand Down

0 comments on commit 23ee046

Please sign in to comment.