From 809a0362c1b46429c9a5961a0fc74af83c8d6227 Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Fri, 6 May 2022 22:24:51 +0800 Subject: [PATCH] Make import defaults inspector honor property style settings --- editor/import_defaults_editor.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/editor/import_defaults_editor.cpp b/editor/import_defaults_editor.cpp index 3ae50343a582..a36b69c4d7c7 100644 --- a/editor/import_defaults_editor.cpp +++ b/editor/import_defaults_editor.cpp @@ -70,10 +70,15 @@ class ImportDefaultsEditorSettings : public Object { }; void ImportDefaultsEditor::_notification(int p_what) { - if (p_what == NOTIFICATION_PREDELETE) { - if (inspector) { + switch (p_what) { + case NOTIFICATION_ENTER_TREE: + case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: { + inspector->set_property_name_style(EditorPropertyNameProcessor::get_settings_style()); + } break; + + case NOTIFICATION_PREDELETE: { inspector->edit(nullptr); - } + } break; } }