summaryrefslogtreecommitdiffstats
path: root/scene/2d/camera_2d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d/camera_2d.cpp')
-rw-r--r--scene/2d/camera_2d.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp
index 18ef2d8505..514c5e7a8f 100644
--- a/scene/2d/camera_2d.cpp
+++ b/scene/2d/camera_2d.cpp
@@ -74,6 +74,14 @@ void Camera2D::_update_scroll() {
}
}
+#ifdef TOOLS_ENABLED
+void Camera2D::_project_settings_changed() {
+ if (screen_drawing_enabled) {
+ queue_redraw();
+ }
+}
+#endif
+
void Camera2D::_update_process_callback() {
if (is_physics_interpolated_and_enabled()) {
set_process_internal(is_current());
@@ -267,6 +275,14 @@ void Camera2D::_ensure_update_interpolation_data() {
void Camera2D::_notification(int p_what) {
switch (p_what) {
+#ifdef TOOLS_ENABLED
+ case NOTIFICATION_READY: {
+ if (Engine::get_singleton()->is_editor_hint() && is_part_of_edited_scene()) {
+ ProjectSettings::get_singleton()->connect(SNAME("settings_changed"), callable_mp(this, &Camera2D::_project_settings_changed));
+ }
+ } break;
+#endif
+
case NOTIFICATION_INTERNAL_PROCESS: {
_update_scroll();
} break;