Skip to content

fix: make select inverse a no-op when nothing is selected - #32

Merged
IAmJSD merged 1 commit into
Infrawrench:mainfrom
ProdigyRahul:fix/select-inverse-guard
Aug 25, 2026
Merged

fix: make select inverse a no-op when nothing is selected#32
IAmJSD merged 1 commit into
Infrawrench:mainfrom
ProdigyRahul:fix/select-inverse-guard

Conversation

@ProdigyRahul

Copy link
Copy Markdown
Contributor

fixes #31

return early from Selection::invert when nothing is selected, and skip the command entirely so it does not push a history entry that changed nothing.

deliberately does not touch the inactive-means-full-coverage convention in coverage(). that convention is what lets edits reach the whole canvas and is relied on throughout the editing paths; inverting is the caller that was wrong about it.

no-op rather than select-all, matching photoshop.

before

before

after

after

@IAmJSD IAmJSD left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@IAmJSD
IAmJSD merged commit 5f6161e into Infrawrench:main Aug 25, 2026
3 checks passed
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.

select inverse with nothing selected silently blocks all editing

2 participants