Skip to content

Commit

Permalink
Remove wms restricted layouts. (#819)
Browse files Browse the repository at this point in the history
Co-authored-by: wlorenzetti <[email protected]>
  • Loading branch information
wlorenzetti and wlorenzetti authored Apr 19, 2024
1 parent 9dfc75e commit 0e73d1d
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 0e73d1d

Please sign in to comment.