Skip to content

fix(script): Property/Layer/Item.selected setters handle false to deselect - #615

Closed
vbasky wants to merge 1 commit into
storytold:mainfrom
vbasky:main
Closed

vbasky wants to merge 1 commit into
storytold:mainfrom
vbasky:main

Conversation

@vbasky

@vbasky vbasky commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Fixes three related bugs in the scripting model's property setters:

  1. Property.selected (Issue fix(script): pending TextDocument baseline edits leave baseline getters stale #549): Only handled , ignored . Now properly calls with to deselect.

  2. Layer.selected (Issue fix(script): Property.selected ignores false assignments #548): Used which flipped state rather than explicitly setting it. Now uses explicit (select) and (deselect).

  3. Item.selected (Issue fix(script): Property.selected ignores false assignments #548): Missing case for deselecting project items. Now properly handles both cases.

All 43 script tests pass.

…elect

- PropertyBase.selected: now calls prop.select with add: false when v is false
- Layer.selected: now uses explicit add: true/false instead of toggle
- Item.selected: now handles false case to deselect project items

Fixes storytold#548, storytold#549

Copy link
Copy Markdown
Member

Thanks @vbasky! Main already has this behaviour. Property.selected = false goes through prop.deselect (#566 plus a follow-up so masks and effect groups deselect too), Item.selected = false landed with #559, and the Layer setter was already correct. This branch also conflicts with main, and its add:false paths would select rather than deselect, so we're closing it as superseded. Your other PRs (#610, #614) are landing now.


Generated by Claude Code

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants