Fix group visibility not updating in viewport after undo/redo (#3335)#3359
Open
phatgolo wants to merge 2 commits intoJannisX11:nextfrom
Open
Fix group visibility not updating in viewport after undo/redo (#3335)#3359phatgolo wants to merge 2 commits intoJannisX11:nextfrom
phatgolo wants to merge 2 commits intoJannisX11:nextfrom
Conversation
✅ Deploy Preview for blockbench-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Yeah 🥳 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix group visibility not updating in viewport after undo/redo (#3335)
Problem
When toggling group visibility in the outliner after an undo/redo cycle, elements inside the group remain invisible in the 3D viewport even though the outliner shows them as visible.
Two issues contribute to this:
Canvas.updateVisibility()only updates element mesh visibility — it never syncs group mesh visibility, so toggling a group's eye icon doesn't propagate to the 3D scene.Undo.initEdit) used a separateaffected_groupsarray that only tracked directly targeted groups, missing any child groups toggled viaforEachChild. This caused undo/redo to leave group visibility state inconsistent.Changes
Canvas.updateVisibility()to match each group'svisibilityproperty.affected_groupstracking withaffected.filter(node => node instanceof Group), which correctly captures all affected groups including children. Remove the now-unusedaffected_groupsvariable.Fixes #3335