summaryrefslogtreecommitdiff
path: root/scene/3d/camera.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d/camera.cpp')
-rw-r--r--scene/3d/camera.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/scene/3d/camera.cpp b/scene/3d/camera.cpp
index abc4a03498..af210fff1c 100644
--- a/scene/3d/camera.cpp
+++ b/scene/3d/camera.cpp
@@ -191,11 +191,12 @@ void Camera::_update_camera() {
get_viewport()->_camera_transform_changed_notify();
*/
- if (is_inside_tree() && is_current()) {
- get_viewport()->_camera_transform_changed_notify();
- }
+ if (!is_inside_tree() || get_tree()->is_node_being_edited(this) || !is_current())
+ return;
+
+ get_viewport()->_camera_transform_changed_notify();
- if (is_current() && get_world().is_valid()) {
+ if (get_world().is_valid()) {
get_world()->_update_camera(this);
}
}