Fix RGB scrollbar values persisting across item selections#25
Open
muhammadrashid4587 wants to merge 1 commit into
Open
Fix RGB scrollbar values persisting across item selections#25muhammadrashid4587 wants to merge 1 commit into
muhammadrashid4587 wants to merge 1 commit into
Conversation
When selecting a new item in the designer, the R/G/B scrollbar memory from the previous item was carried over because UI.memory entries are only initialized once. This resets the scroll position and condition for R, G, B scrollbars on item change. Fixes Osman-Kahraman#24 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Osman-Kahraman
requested changes
Mar 11, 2026
Osman-Kahraman
left a comment
Owner
There was a problem hiding this comment.
@muhammadrashid4587- First of all I don't prefer AI-based PR's on the projects. Please add your own sentences and thoughts.
I tested your changes and it solves the issue #24. But it completely bypasses last updated version, take a look at this closed #23 PR. I cannot merge with prev version.
Please assign yourself for issue #24. And use the last updated version of the repo. Thank you for your contribution.
| self.objectAnims = [] | ||
| # Reset RGB scrollbar state so stale values from | ||
| # the previous item are not carried over. | ||
| for _rgb_key in ("R", "G", "B"): |
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.
Summary
UI.memoryentries for scrollbar windows are only initialized once (on first render), so the scroll position and condition carry over between item changesscrollandconditionfor R, G, B memory keys when a new item is selected in the designerRoot Cause
In
designer.py, whenUI.window("R", ...)is called, the memory entry is created only if it doesn't already exist (guarded byKeyErroroncls.memory[name]["surface"]). The"scroll"list and"condition"value therefore persist across item selections, causing the color preview to show stale RGB values from the previous item.Test plan
Fixes #24
🤖 Generated with Claude Code