Skip to content

Fix editor unsaved scenes getting file path updates#118225

Merged
Repiteo merged 1 commit into
godotengine:masterfrom
Hrothdel:editor-fix-resource-preview-jitter
May 19, 2026
Merged

Fix editor unsaved scenes getting file path updates#118225
Repiteo merged 1 commit into
godotengine:masterfrom
Hrothdel:editor-fix-resource-preview-jitter

Conversation

@Hrothdel
Copy link
Copy Markdown
Contributor

@Hrothdel Hrothdel commented Apr 5, 2026

Fixes #116703

Unsaved scenes were getting their path set to another empty string every time EditorData::get_scene_path was called for them. This caused a scene tree update, resulting in some jitter for resource previews. The jitter could probably be investigated further, as it would be nice for it to not happen even on scene tree updates, but this seems to solve the main problem for now.

@Hrothdel Hrothdel requested a review from a team as a code owner April 5, 2026 18:06
@Nintorch Nintorch added this to the 4.7 milestone Apr 6, 2026
@EBII
Copy link
Copy Markdown

EBII commented Apr 6, 2026

❌ CI Report — PR #118225

Repository: godotengine/godot
Base branch: master
Overall:FAIL
Date: 2026-04-06 13:45 UTC

Checks

Check Status Details
merge_check ✅ pass Clean merge with master
gitignore_check ✅ pass OK
static_checks ✅ pass All hooks passed
build ✅ pass target=editor
doctool ✅ pass API docs up to date
gdextension_api ✅ pass API consistent
unit_tests ✅ pass All tests passed
regression_cyclic ✅ pass GDScript cyclic compilation OK
regression_gltf ⏭️ skip Skipped
regression_project ✅ pass Regression project passed
build_ubsan ❌ fail GCC + UBSan (sans ASan) — detecte les undefined behaviors (target=editor) — EXIT_CODE=2 false positive GCC
build_clang ✅ pass Clang (sans sanitizers) — detecte les bugs compilateur-specifiques (target=editor)

test build with dagger ci auto coment PR CI par

@Hrothdel
Copy link
Copy Markdown
Contributor Author

Hrothdel commented Apr 6, 2026

build_ubsan ❌ fail

This might be an issue with your setup, this PR doesn't do anything that could result in only the ubsan build to fail, and it builds fine on my end using gcc. I also got a linking error when trying to build with clang, so something similar might also be happening for you.

Copy link
Copy Markdown
Member

@KoBeWi KoBeWi left a comment

Choose a reason for hiding this comment

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

The problem comes from Node's set_scene_file_path() not checking if the new path is different and always calling _emit_editor_state_changed(), but the editor-side solution is less invasive.

@Repiteo Repiteo merged commit 9a0bc64 into godotengine:master May 19, 2026
39 of 40 checks passed
@Repiteo
Copy link
Copy Markdown
Contributor

Repiteo commented May 19, 2026

Thanks!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unsaved Scene Causes Inspector Jitter When Changing Mesh Properties

5 participants