File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,14 @@ void Camera2D::_update_scroll() {
7474 }
7575}
7676
77+ #ifdef TOOLS_ENABLED
78+ void Camera2D::_project_settings_changed () {
79+ if (screen_drawing_enabled) {
80+ queue_redraw ();
81+ }
82+ }
83+ #endif
84+
7785void Camera2D::_update_process_callback () {
7886 if (is_physics_interpolated_and_enabled ()) {
7987 set_process_internal (is_current ());
@@ -267,6 +275,14 @@ void Camera2D::_ensure_update_interpolation_data() {
267275
268276void Camera2D::_notification (int p_what) {
269277 switch (p_what) {
278+ #ifdef TOOLS_ENABLED
279+ case NOTIFICATION_READY: {
280+ if (Engine::get_singleton ()->is_editor_hint () && is_part_of_edited_scene ()) {
281+ ProjectSettings::get_singleton ()->connect (SNAME (" settings_changed" ), callable_mp (this , &Camera2D::_project_settings_changed));
282+ }
283+ } break ;
284+ #endif
285+
270286 case NOTIFICATION_INTERNAL_PROCESS: {
271287 _update_scroll ();
272288 } break ;
Original file line number Diff line number Diff line change @@ -88,6 +88,9 @@ class Camera2D : public Node2D {
8888 bool _is_editing_in_editor () const ;
8989 void _update_process_callback ();
9090 void _update_scroll ();
91+ #ifdef TOOLS_ENABLED
92+ void _project_settings_changed ();
93+ #endif
9194
9295 void _make_current (Object *p_which);
9396 void _reset_just_exited () { just_exited_tree = false ; }
You can’t perform that action at this time.
0 commit comments