Skip to content

[Masking] Fix copy/paste of symbol or converting renderer#60325

Merged
nyalldawson merged 4 commits intoqgis:masterfrom
troopa81:fix_smask_copypaste
Feb 4, 2025
Merged

[Masking] Fix copy/paste of symbol or converting renderer#60325
nyalldawson merged 4 commits intoqgis:masterfrom
troopa81:fix_smask_copypaste

Conversation

@troopa81
Copy link
Copy Markdown
Contributor

Properly reset symbol layer ids when copy/pasting symbol or when converting a rule based renderer into a categorized renderer.

Fixes #46402 where issues comes from symbol layers having identical symbol layers ids, coming from I presume, actions described just above

@github-actions github-actions Bot added this to the 3.42.0 milestone Jan 28, 2025
@troopa81 troopa81 changed the title Fix smask copypaste [Masking] Fix copy/paste of symbol or converting renderer Jan 28, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 28, 2025

🪟 Windows builds

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

🪟 Windows Qt6 builds

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

Comment thread src/core/symbology/qgssymbollayerutils.cpp Outdated
@troopa81 troopa81 force-pushed the fix_smask_copypaste branch from 2bc81d4 to dc2e6b3 Compare February 4, 2025 08:53
@nyalldawson nyalldawson merged commit ed11cc6 into qgis:master Feb 4, 2025
@qgis-bot
Copy link
Copy Markdown
Collaborator

qgis-bot commented Feb 4, 2025

The backport to release-3_40 failed:

The process '/usr/bin/git' failed with exit code 1
stderr
error: could not apply 2bd0d2eaaf1... fix(SymbolCopyPaste): reset symbol layer ids on copy/paste
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config set advice.mergeConflict false"

stdout
Auto-merging python/PyQt6/core/auto_generated/symbology/qgssymbollayer.sip.in
Auto-merging python/core/auto_generated/symbology/qgssymbollayer.sip.in
Auto-merging src/core/symbology/qgssymbollayer.cpp
Auto-merging src/core/symbology/qgssymbollayer.h
Auto-merging src/core/symbology/qgssymbollayerutils.cpp
Auto-merging tests/src/python/test_qgscategorizedsymbolrenderer.py
[backport-60325-to-release-3_40 413b52b641f] fix(CategorizedRenderer): reset mask information on source symbol
 Author: Julien Cabieces <julien.cabieces@oslandia.com>
 Date: Tue Jan 28 15:32:49 2025 +0100
 16 files changed, 123 insertions(+), 7 deletions(-)
[backport-60325-to-release-3_40 5d699df9207] clean(MaskingWidget): remove unused variables
 Author: Julien Cabieces <julien.cabieces@oslandia.com>
 Date: Tue Jan 28 15:38:39 2025 +0100
 2 files changed, 4 insertions(+), 10 deletions(-)
Auto-merging src/app/qgsapplayertreeviewmenuprovider.cpp
CONFLICT (content): Merge conflict in src/app/qgsapplayertreeviewmenuprovider.cpp

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-release-3_40 release-3_40
# Navigate to the new working tree
cd .worktrees/backport-release-3_40
# Create a new branch
git switch --create backport-60325-to-release-3_40
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick c26cf427006070f4c11d7712b017efe0a15dac70,24aeb7ea95a6f547d40f1c485d850951c6ab93ed,2bd0d2eaaf1329ac5ba4e611bc67d306d085c0d8,dc2e6b3f79185459ec3f531a7a8021df328c972d
# Push it to GitHub
git push --set-upstream origin backport-60325-to-release-3_40
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release-3_40

Then, create a pull request where the base branch is release-3_40 and the compare/head branch is backport-60325-to-release-3_40.

@qgis-bot qgis-bot added the failed backport The automated backport attempt failed, needs a manual backport label Feb 4, 2025
@agiudiceandrea
Copy link
Copy Markdown
Member

Please see #46402 (comment).

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

Labels

failed backport The automated backport attempt failed, needs a manual backport

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Masking labels doesn't work with rule based labeling

4 participants