summaryrefslogtreecommitdiffstats
path: root/editor/plugins/text_control_editor_plugin.cpp
diff options
context:
space:
mode:
authorJakob Bouchard <24767889+jakobbouchard@users.noreply.github.com>2022-02-16 09:17:55 -0500
committerJakob Bouchard <24767889+jakobbouchard@users.noreply.github.com>2022-02-16 13:03:05 -0500
commit6553f5c242865f9aadbe2fdab6db6876c44ac472 (patch)
treedbd6922a056a26a57fe0b62551bbfabed512fd99 /editor/plugins/text_control_editor_plugin.cpp
parent98b97d34df7f3ab2cafc3847358c231c3d357b40 (diff)
downloadredot-engine-6553f5c242865f9aadbe2fdab6db6876c44ac472.tar.gz
Convert _notification methods to switch - Chunk C
Diffstat (limited to 'editor/plugins/text_control_editor_plugin.cpp')
-rw-r--r--editor/plugins/text_control_editor_plugin.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/editor/plugins/text_control_editor_plugin.cpp b/editor/plugins/text_control_editor_plugin.cpp
index ab3d6dcca9..4290888e94 100644
--- a/editor/plugins/text_control_editor_plugin.cpp
+++ b/editor/plugins/text_control_editor_plugin.cpp
@@ -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;
}
}