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

Remove wms restricted layouts. #819

Merged
merged 2 commits into from
Apr 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading