diff options
| author | Rémi Verschelde <remi@verschelde.fr> | 2022-02-16 20:58:55 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-16 20:58:55 +0100 |
| commit | 009254d87c1de573d2abeb273676f22d0bdfc67f (patch) | |
| tree | 6123649c85c0a6d513224901de8a25bc068c4901 /editor/plugins/texture_3d_editor_plugin.cpp | |
| parent | 5d5f80b5295479ca4e12989394b3a2af8819a1ee (diff) | |
| parent | 6553f5c242865f9aadbe2fdab6db6876c44ac472 (diff) | |
Merge pull request #58187 from jakobbouchard/notification-switch-chunk-c
Convert _notification methods to switch - Chunk C
Diffstat (limited to 'editor/plugins/texture_3d_editor_plugin.cpp')
| -rw-r--r-- | editor/plugins/texture_3d_editor_plugin.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/editor/plugins/texture_3d_editor_plugin.cpp b/editor/plugins/texture_3d_editor_plugin.cpp index 880cbeffba..0fc7079a24 100644 --- a/editor/plugins/texture_3d_editor_plugin.cpp +++ b/editor/plugins/texture_3d_editor_plugin.cpp @@ -35,18 +35,17 @@ void Texture3DEditor::_texture_rect_draw() { } void Texture3DEditor::_notification(int p_what) { - if (p_what == NOTIFICATION_READY) { - //get_scene()->connect("node_removed",this,"_node_removed"); - } - if (p_what == NOTIFICATION_RESIZED) { - _texture_rect_update_area(); - } + switch (p_what) { + case NOTIFICATION_RESIZED: { + _texture_rect_update_area(); + } break; - if (p_what == NOTIFICATION_DRAW) { - Ref<Texture2D> checkerboard = get_theme_icon(SNAME("Checkerboard"), SNAME("EditorIcons")); - Size2 size = get_size(); + case NOTIFICATION_DRAW: { + Ref<Texture2D> checkerboard = get_theme_icon(SNAME("Checkerboard"), SNAME("EditorIcons")); + Size2 size = get_size(); - draw_texture_rect(checkerboard, Rect2(Point2(), size), true); + draw_texture_rect(checkerboard, Rect2(Point2(), size), true); + } break; } } |