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

Fix single feature renderer symbol levels reset when changing style #31413

Merged
merged 3 commits into from
Aug 26, 2019

Conversation

nirvn
Copy link
Contributor

@nirvn nirvn commented Aug 26, 2019

Description

This PR fixes #26547, whereas the symbol levels were reset to the values set when opening the style panel / layer properties window whenever the layer symbol was modified.

I've taken the opportunity to cleanup the symbol selector {widget, dialog} class a bit.

Checklist

  • Commit messages are descriptive and explain the rationale for changes
  • Commits which fix bugs include Fixes #11111 at the bottom of the commit message
  • I have read the QGIS Coding Standards and this PR complies with them
  • New unit tests have been added for core changes
  • I have run the scripts/prepare-commit.sh script before each commit
  • I have evaluated whether it is appropriate for this PR to be backported, backport requests are left as label or comment

@nirvn nirvn requested a review from nyalldawson August 26, 2019 04:27
* \param parent The parent symbol layer item. If the parent parameter is null, the whole symbol and model will be reset.
* \note not available in Python bindings
*/
void loadSymbol( QgsSymbol *symbol, SymbolLayerItem *parent = nullptr ) SIP_SKIP;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you add a TODO QGIS 4 note here saying "QGIS 4: transfer ownership of symbol", and in the dox note that ownership is NOT transferred and that the symbol MUST exist for the lifetime of the widget

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@nirvn nirvn added backport release-3_4 Bug Either a bug report, or a bug fix. Let's hope for the latter! labels Aug 26, 2019
@nirvn nirvn merged commit 07c871d into qgis:master Aug 26, 2019
@backporting
Copy link
Contributor

backporting bot commented Aug 26, 2019

The backport to release-3_4 failed:

Commits ["536987c05dac32820a8943b03c24d4edc32560c7","55465f928d1651986be7a2f2bc86c09cd25b3da5","8c7892a2c157642073a7346b885ba29237e394b6"] could not be cherry-picked on top of release-3_4

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub.
git fetch
# Create new working tree.
git worktree add .worktrees/backport release-3_4
# Navigate to the new directory.
cd .worktrees/backport
# Cherry-pick all the commits of this pull request and resolve the likely conflicts.
git cherry-pick 536987c05dac32820a8943b03c24d4edc32560c7 55465f928d1651986be7a2f2bc86c09cd25b3da5 8c7892a2c157642073a7346b885ba29237e394b6
# Create a new branch with these backported commits.
git checkout -b backport-31413-to-release-3_4
# Push it to GitHub.
git push --set-upstream origin backport-31413-to-release-3_4
# Go back to the original working tree.
cd ../..
# Delete the working tree.
git worktree remove .worktrees/backport

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

@backporting
Copy link
Contributor

backporting bot commented Aug 26, 2019

The backport to release-3_8 failed:

Commits ["536987c05dac32820a8943b03c24d4edc32560c7","55465f928d1651986be7a2f2bc86c09cd25b3da5","8c7892a2c157642073a7346b885ba29237e394b6"] could not be cherry-picked on top of release-3_8

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub.
git fetch
# Create new working tree.
git worktree add .worktrees/backport release-3_8
# Navigate to the new directory.
cd .worktrees/backport
# Cherry-pick all the commits of this pull request and resolve the likely conflicts.
git cherry-pick 536987c05dac32820a8943b03c24d4edc32560c7 55465f928d1651986be7a2f2bc86c09cd25b3da5 8c7892a2c157642073a7346b885ba29237e394b6
# Create a new branch with these backported commits.
git checkout -b backport-31413-to-release-3_8
# Push it to GitHub.
git push --set-upstream origin backport-31413-to-release-3_8
# Go back to the original working tree.
cd ../..
# Delete the working tree.
git worktree remove .worktrees/backport

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Symbol levels reset when changing style settings
2 participants