Merge pull request #69644 from radenling/fix-viewport-update-in-editor

Fix for 2D viewport not updating in the editor when the camera moves
This commit is contained in:
Rémi Verschelde 2022-12-09 18:06:23 +01:00
commit 156b5ca38f
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -39,8 +39,11 @@ void Camera2D::_update_scroll() {
}
if (Engine::get_singleton()->is_editor_hint()) {
queue_redraw(); //will just be drawn
return;
queue_redraw();
// Only set viewport transform when not bound to the main viewport.
if (get_viewport() == get_tree()->get_edited_scene_root()->get_viewport()) {
return;
}
}
if (!viewport) {