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
ATLAS: LEGEND support clipping #54692
ATLAS: LEGEND support clipping #54692
Conversation
c6855de
to
d156fba
Compare
I’m a new, I don’t understand what to do. Could you explain to me how to proceed? |
Sure, you couldn't possibly know, it is well hidden. Download this package on windows, unzip it twice in a folder of your choice and run the qgis exe. https://github.com/qgis/QGIS/suites/16418208318/artifacts/938243476 This is a QGIS build automatically created with the changes in this PR so you can test the changes. |
@elpaso Thank you. |
Thanks for checking! |
It is quite normal, it is you who are struggling to improve Qgis, it is rather for me to thank you for all the work |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to admit I'm no expert in this part of the code, sorry if I failed to understand the cause of some of this modifications.
layersToClip = mMap->atlasClippingSettings()->layersToClip(); | ||
for ( QgsMapLayer *layer : std::as_const( layersToClip ) ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
layersToClip = mMap->atlasClippingSettings()->layersToClip(); | |
for ( QgsMapLayer *layer : std::as_const( layersToClip ) ) | |
const QList<QgsMapLayer *> layersToClip = mMap->atlasClippingSettings()->layersToClip(); | |
for ( QgsMapLayer *layer : layersToClip) |
We can reduce the scope of layersToClip here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the std::as_const
should stay though even if it is redundant: I was told several times from other developers that it makes things clearer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: isn't my original version slightly faster? I don't know if the compiler can optimize it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we can keep the std::as_const indeed, it doesn't harm.
Not sure to understand why it would be slighly faster. Anyway it is purely cosmetic and non blocking for merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we can keep the std::as_const indeed, it doesn't harm.
Not sure to understand why it would be slighly faster. Anyway it is purely cosmetic and non blocking for merge
because the assignment down inside the loop is done multiple times instead of once before the loop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my comment was just to move the declaration at the same line of the assignment, not inside the loop. But nevermind that's not a big deal.
The backport to
stderr
stdout
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-queued_ltr_backports queued_ltr_backports
# Navigate to the new working tree
cd .worktrees/backport-queued_ltr_backports
# Create a new branch
git switch --create backport-54692-to-queued_ltr_backports
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick d156fbabfcdd5bf632f2643d933a507d6885f96b,bbfefcfc81ef81f70df5b2e8d7ca1c79395859f0
# Push it to GitHub
git push --set-upstream origin backport-54692-to-queued_ltr_backports
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-queued_ltr_backports Then, create a pull request where the |
Fix #54654
Working on the tests...
@Geoscope19 please test the artifact when ready.