Skip to content

Add a flag to prevent infinite loop if changing layers adds a history item#1660

Merged
cameronwhite merged 1 commit into
masterfrom
fix/layer-list-loop
Aug 10, 2025
Merged

Add a flag to prevent infinite loop if changing layers adds a history item#1660
cameronwhite merged 1 commit into
masterfrom
fix/layer-list-loop

Conversation

@cameronwhite

Copy link
Copy Markdown
Member

When a history item is added, the list view is rebuilt and the selection is reset back to its original value. When this happens, we don't need to trigger another change to the document's active layer since the selection won't be any different. This previously led to an infinite loop because the current tool is committed before updating the document's active layer.

Fixes: #1463

… item

When a history item is added, the list view is rebuilt and the selection is reset back to its original value. When this happens, we don't need to trigger another change to the document's active layer since the selection won't be any different. This previously led to an infinite loop because the current tool is committed before updating the document's active layer.

Fixes: #1463
@cameronwhite cameronwhite merged commit 87f8a75 into master Aug 10, 2025
11 checks passed
@pedropaulosuzuki

Copy link
Copy Markdown
Contributor

@cameronwhite Could this be backported to 3.0.6? I did some quick testing and it seems to work fine (I patched the fix on top of 3.0.5).

@cameronwhite

Copy link
Copy Markdown
Member Author

I'm hoping to instead just get 3.1 ready to release :) (pushing some remaining tasks to 3.2 if necessary)
The old canvas widget has been a big source of bug reports so I'd like to get that fix out for users, along with the other good things so far in 3.1

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.

[Crash] Changing layers after drawing rectangle causes stack overflow

2 participants