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

[SelectiveMasking] Fix masks UI update #57679

Merged
merged 4 commits into from
Jun 14, 2024

Conversation

troopa81
Copy link
Contributor

@troopa81 troopa81 commented Jun 5, 2024

Create a data structure on stack to avoid useless QTreeWidgetItem heap memory allocation which slows down considerably widget populate. That allows then to remove some flaky code used to avoid as much as possible masking widget update, causing refresh issues.

I tested it with the #34942 use case where masking widget populate was almost 3s. Since those modifications, populate is less than 50ms, so we can just update the masking widget every time it's useful.

troopa81 added 3 commits June 5, 2024 19:13
Create a data structure on stack to avoid useless QTreeWidgetItem heap
memory allocation which slows down considerably widget populate.
Fixes qgis#57248
Remove flaky code used to avoid as much as possible masking widget
populate. This cause refresh issues and populate is now way more efficient.
@github-actions github-actions bot added this to the 3.38.0 milestone Jun 5, 2024
Copy link

github-actions bot commented Jun 5, 2024

🪟 Windows builds ready!

Windows builds of this PR are available for testing here. Debug symbols for this build are available here.

(Built from commit 02adff2)

@troopa81 troopa81 added Symbology Related to vector layer symbology or renderers Bug Either a bug report, or a bug fix. Let's hope for the latter! backport queued_ltr_backports Queued Backports GUI/UX Related to QGIS application GUI or User Experience and removed Symbology Related to vector layer symbology or renderers labels Jun 6, 2024
Copy link
Contributor

@strk strk left a comment

Choose a reason for hiding this comment

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

Looks good to me. I've left some nitpicking comments but I specially love the testcase !

@troopa81 troopa81 merged commit e756b53 into qgis:master Jun 14, 2024
28 checks passed
@qgis-bot
Copy link
Collaborator

The backport to queued_ltr_backports failed:

The process '/usr/bin/git' failed with exit code 1
stderr
error: could not apply bc107e5ecc2... test(MaskUI): add tests to check selective masking widget behavior
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 advice.mergeConflict false"

stdout
Auto-merging tests/src/gui/CMakeLists.txt
CONFLICT (content): Merge conflict in tests/src/gui/CMakeLists.txt

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-57679-to-queued_ltr_backports
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick bc107e5ecc2cbd8c57d18d88cb5bbb78199c9d12,e6646ec4c47e56019e2d64373d9d575d8904476a,738295481b92364884f8f6fbf933e9cccb27cbb4,02adff26d4e7b5d622dd6e40a6354a411bc01264
# Push it to GitHub
git push --set-upstream origin backport-57679-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 base branch is queued_ltr_backports and the compare/head branch is backport-57679-to-queued_ltr_backports.

@qgis-bot qgis-bot added the failed backport The automated backport attempt failed, needs a manual backport label Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport queued_ltr_backports Queued Backports Bug Either a bug report, or a bug fix. Let's hope for the latter! failed backport The automated backport attempt failed, needs a manual backport GUI/UX Related to QGIS application GUI or User Experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants