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

Correctly move layout legend nodes when they are filtered #60536

Merged
merged 2 commits into from
Mar 10, 2025

Conversation

Djedouas
Copy link
Member

Description

Fixes #60383.

In a layout, when moving a legend node on a filtered legend, the computed offset was wrong if some nodes were hidden between the node to move and its destination.

The offset is now computed with the next/previous visible index.

@github-actions github-actions bot added this to the 3.42.0 milestone Feb 10, 2025
Copy link

github-actions bot commented Feb 10, 2025

🪟 Windows builds

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

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit 6f32786)

@Djedouas
Copy link
Member Author

I don't see why clang-tidy fails here... locally I don't get the moc file missing error, only the warnings.

By the way, I did not change anything in the includes.

@Djedouas Djedouas force-pushed the composer-filtered-legend branch 2 times, most recently from 5efa4c6 to a3bebfc Compare February 13, 2025 13:02
@troopa81
Copy link
Contributor

#60592 Should fix the cland-tidy issue but it's not related at all to this PR

@troopa81
Copy link
Contributor

troopa81 commented Mar 5, 2025

You have to fix the warning in clang-tidy, an anonymous namespace may fix it

@Djedouas Djedouas force-pushed the composer-filtered-legend branch from 6ad1436 to 874685d Compare March 5, 2025 15:34
Copy link
Contributor

@troopa81 troopa81 left a comment

Choose a reason for hiding this comment

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

just a cosmetic proposal, the rest looks good

@Djedouas Djedouas force-pushed the composer-filtered-legend branch from 874685d to 82098b4 Compare March 6, 2025 13:08
@Djedouas Djedouas force-pushed the composer-filtered-legend branch from 82098b4 to 59e41c0 Compare March 7, 2025 09:07
Djedouas added 2 commits March 7, 2025 10:08
…ltered

Fixes qgis#60383.

In a layout, when moving a legend node on a filtered legend, the
computed offset was wrong if some nodes were hidden between the node to
move and its destination.

The offset is now computed with the next/previous visible index.
For "private" functions like the underscore-prefixed-by-convention
functions, use an unnamed namespace to affect visibility over static
keyword which has many meanings.
@Djedouas Djedouas force-pushed the composer-filtered-legend branch from 59e41c0 to 6f32786 Compare March 7, 2025 09:08
@Djedouas Djedouas closed this Mar 7, 2025
@Djedouas Djedouas reopened this Mar 7, 2025
@troopa81 troopa81 closed this Mar 10, 2025
@troopa81 troopa81 reopened this Mar 10, 2025
@troopa81
Copy link
Contributor

unrelated test failure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rule based symbology sorting with all fields in legend when only linked maps is ticked
3 participants