Fix regions silently failing to save after an interrupted brush stroke - #1008
Merged
TokisanGames merged 1 commit intoJul 28, 2026
Merged
Conversation
Owner
|
Our environment artist has reported an elusive bug where sometimes regions get in a state where they won't save. We haven't been able to find the cause, so this is a very welcome contribution. |
Owner
|
Is it better to clear the flag, or is it better to call stop_operation() which will clear the flag and store the undo? 🤔 |
Contributor
Author
|
would it be this simple? (updated the commit) |
If a brush stroke ends without `stop_operation()` running, the affected regions are left permanently flagged as edited. This means `backup_region()` skips them, which means they are never marked modified, never written to disk, and never recorded for undo operations.
sci-comp
force-pushed
the
fix-intercepted-operations
branch
from
July 27, 2026 14:52
8c393c0 to
e0108aa
Compare
Owner
|
Excellent, thank you! |
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.
If a brush stroke ends without
stop_operation()running, the affected regions are left permanently flagged as edited. This meansbackup_region()skips them, which means they are never marked modified, never written to disk, and never recorded for undo operations.This bug will help resolve sci-comp/scene-builder#34 in my level design asset, which is how I found this bug (it's easy to intercept Terrain3D operations when another plugin is listening for hotkeys).