summaryrefslogtreecommitdiff
path: root/editor/debugger/editor_visual_profiler.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-02-16 15:26:02 +0100
committerGitHub <noreply@github.com>2022-02-16 15:26:02 +0100
commitb5c0a892d45b1a9df10aaf0f468252925ea2a4b9 (patch)
treeca006460a31bf1ec8031e40952394a39e824d5f0 /editor/debugger/editor_visual_profiler.cpp
parenteeda603355bdaf76d138d2646b3e4316924efe29 (diff)
parentdcd2a92af3cc85b50ee2c02dc64589da6d429e8c (diff)
Merge pull request #58163 from jmb462/notification-chunk-A
Diffstat (limited to 'editor/debugger/editor_visual_profiler.cpp')
-rw-r--r--editor/debugger/editor_visual_profiler.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/editor/debugger/editor_visual_profiler.cpp b/editor/debugger/editor_visual_profiler.cpp
index 3cb5d3513d..c137740bda 100644
--- a/editor/debugger/editor_visual_profiler.cpp
+++ b/editor/debugger/editor_visual_profiler.cpp
@@ -423,13 +423,17 @@ void EditorVisualProfiler::_clear_pressed() {
}
void EditorVisualProfiler::_notification(int p_what) {
- if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_LAYOUT_DIRECTION_CHANGED || p_what == NOTIFICATION_TRANSLATION_CHANGED) {
- if (is_layout_rtl()) {
- activate->set_icon(get_theme_icon(SNAME("PlayBackwards"), SNAME("EditorIcons")));
- } else {
- activate->set_icon(get_theme_icon(SNAME("Play"), SNAME("EditorIcons")));
- }
- clear_button->set_icon(get_theme_icon(SNAME("Clear"), SNAME("EditorIcons")));
+ switch (p_what) {
+ case NOTIFICATION_ENTER_TREE:
+ case NOTIFICATION_LAYOUT_DIRECTION_CHANGED:
+ case NOTIFICATION_TRANSLATION_CHANGED: {
+ if (is_layout_rtl()) {
+ activate->set_icon(get_theme_icon(SNAME("PlayBackwards"), SNAME("EditorIcons")));
+ } else {
+ activate->set_icon(get_theme_icon(SNAME("Play"), SNAME("EditorIcons")));
+ }
+ clear_button->set_icon(get_theme_icon(SNAME("Clear"), SNAME("EditorIcons")));
+ } break;
}
}