1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00

Convert _notification methods to switch - Chunk C

This commit is contained in:
Jakob Bouchard
2022-02-16 09:17:55 -05:00
parent 98b97d34df
commit 6553f5c242
37 changed files with 378 additions and 327 deletions

View File

@@ -700,6 +700,7 @@ void SceneTreeEditor::_notification(int p_what) {
_update_tree();
} break;
case NOTIFICATION_EXIT_TREE: {
get_tree()->disconnect("tree_changed", callable_mp(this, &SceneTreeEditor::_tree_changed));
get_tree()->disconnect("tree_process_mode_changed", callable_mp(this, &SceneTreeEditor::_tree_process_mode_changed));
@@ -708,6 +709,7 @@ void SceneTreeEditor::_notification(int p_what) {
tree->disconnect("item_collapsed", callable_mp(this, &SceneTreeEditor::_cell_collapsed));
get_tree()->disconnect("node_configuration_warning_changed", callable_mp(this, &SceneTreeEditor::_warning_changed));
} break;
case NOTIFICATION_THEME_CHANGED: {
_update_tree();
} break;
@@ -1283,13 +1285,16 @@ void SceneTreeDialog::_notification(int p_what) {
tree->update_tree();
}
} break;
case NOTIFICATION_ENTER_TREE: {
connect("confirmed", callable_mp(this, &SceneTreeDialog::_select));
_update_theme();
} break;
case NOTIFICATION_THEME_CHANGED: {
_update_theme();
} break;
case NOTIFICATION_EXIT_TREE: {
disconnect("confirmed", callable_mp(this, &SceneTreeDialog::_select));
} break;