summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-08-19 15:41:46 +0200
committerGitHub <noreply@github.com>2021-08-19 15:41:46 +0200
commit30a5cdc093346d1ccca67e0a1c755f19b8f6f909 (patch)
treefe30e8b85eefc71b7225796ecada86ee75f17eeb
parent8b6c168b3ac14d9ac6350d03e7be4d196311e0fe (diff)
parent78e2d35a7e33da7fa5dd6214272acbd4966da97e (diff)
Merge pull request #51876 from ThreeRhinosInAnElephantCostume/fixcameracurrent
Fixed Camera2d's "current" property getting reset when switching scenes
-rw-r--r--scene/2d/camera_2d.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp
index 13b37aa2b2..bf91ce8e65 100644
--- a/scene/2d/camera_2d.cpp
+++ b/scene/2d/camera_2d.cpp
@@ -261,6 +261,7 @@ void Camera2D::_notification(int p_what) {
if (viewport && !(custom_viewport && !ObjectDB::get_instance(custom_viewport_id))) {
viewport->set_canvas_transform(Transform2D());
clear_current();
+ current = true;
}
}
remove_from_group(group_name);