From 0f5455230c8955be0c6533574bd3d5b6f50792b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 15 Feb 2022 18:06:48 +0100 Subject: Use `switch` consistently in `_notification` (`scene` folder) --- scene/2d/parallax_background.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scene/2d/parallax_background.cpp') diff --git a/scene/2d/parallax_background.cpp b/scene/2d/parallax_background.cpp index f75baaab0f..dcbb6507f5 100644 --- a/scene/2d/parallax_background.cpp +++ b/scene/2d/parallax_background.cpp @@ -29,6 +29,7 @@ /*************************************************************************/ #include "parallax_background.h" + #include "parallax_layer.h" void ParallaxBackground::_notification(int p_what) { @@ -36,8 +37,8 @@ void ParallaxBackground::_notification(int p_what) { case NOTIFICATION_ENTER_TREE: { group_name = "__cameras_" + itos(get_viewport().get_id()); add_to_group(group_name); - } break; + case NOTIFICATION_EXIT_TREE: { remove_from_group(group_name); } break; -- cgit v1.2.3