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

Apply layout page size to all pages #59182

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

YoannQDQ
Copy link
Contributor

Description

On multi-page layout, add a "Apply to all Pages" button in the Page Properties panel.

layout-apply-page-size-to-all

@github-actions github-actions bot added this to the 3.40.0 milestone Oct 23, 2024
@YoannQDQ YoannQDQ added Feature Print Layouts Related to QGIS Print Layouts, Atlas or Reporting frameworks Frozen Feature freeze - Do not merge! labels Oct 23, 2024
Copy link

github-actions bot commented Oct 23, 2024

🪟 Windows builds

Download Windows builds of this PR for testing.
Debug symbols for this build are available here.
(Built from commit 0e41c9f)

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit 0e41c9f)

Comment on lines +451 to +461
QgsLayoutItemPage *referencePage = page( sourcePage );

for ( QgsLayoutItemPage *page : mPages )
{
if ( page == referencePage )
{
continue;
}
page->setPageSize( referencePage->pageSize() );
page->setPageStyleSymbol( referencePage->pageStyleSymbol()->clone() );
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
QgsLayoutItemPage *referencePage = page( sourcePage );
for ( QgsLayoutItemPage *page : mPages )
{
if ( page == referencePage )
{
continue;
}
page->setPageSize( referencePage->pageSize() );
page->setPageStyleSymbol( referencePage->pageStyleSymbol()->clone() );
}
if ( QgsLayoutItemPage *referencePage = page( sourcePage ) )
{
for ( QgsLayoutItemPage *page : std::as_const( mPages ) )
{
if ( page == referencePage )
{
continue;
}
page->setPageSize( referencePage->pageSize() );
page->setPageStyleSymbol( referencePage->pageStyleSymbol()->clone() );
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Frozen Feature freeze - Do not merge! Print Layouts Related to QGIS Print Layouts, Atlas or Reporting frameworks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a "Apply page size to other pages" button to page item properties
2 participants