1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +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

@@ -34,8 +34,8 @@
#include "editor/editor_scale.h"
#include "editor/multi_node_edit.h"
void TextControlEditor::_notification(int p_notification) {
switch (p_notification) {
void TextControlEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
if (!EditorFileSystem::get_singleton()->is_connected("filesystem_changed", callable_mp(this, &TextControlEditor::_reload_fonts))) {
EditorFileSystem::get_singleton()->connect("filesystem_changed", callable_mp(this, &TextControlEditor::_reload_fonts), make_binds(""));
@@ -45,13 +45,12 @@ void TextControlEditor::_notification(int p_notification) {
case NOTIFICATION_THEME_CHANGED: {
clear_formatting->set_icon(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")));
} break;
case NOTIFICATION_EXIT_TREE: {
if (EditorFileSystem::get_singleton()->is_connected("filesystem_changed", callable_mp(this, &TextControlEditor::_reload_fonts))) {
EditorFileSystem::get_singleton()->disconnect("filesystem_changed", callable_mp(this, &TextControlEditor::_reload_fonts));
}
} break;
default:
break;
}
}