diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_feature_profile.cpp | 17 | ||||
-rw-r--r-- | editor/editor_feature_profile.h | 2 | ||||
-rw-r--r-- | editor/editor_node.cpp | 6 | ||||
-rw-r--r-- | editor/plugins/editor_debugger_plugin.h | 2 | ||||
-rw-r--r-- | editor/plugins/texture_region_editor_plugin.cpp | 2 |
5 files changed, 19 insertions, 10 deletions
diff --git a/editor/editor_feature_profile.cpp b/editor/editor_feature_profile.cpp index f68cc3b323..418370a7c3 100644 --- a/editor/editor_feature_profile.cpp +++ b/editor/editor_feature_profile.cpp @@ -41,9 +41,9 @@ const char *EditorFeatureProfile::feature_names[FEATURE_MAX] = { TTRC("Script Editor"), TTRC("Asset Library"), TTRC("Scene Tree Editing"), - TTRC("Import Dock"), TTRC("Node Dock"), - TTRC("FileSystem and Import Docks") + TTRC("FileSystem Dock"), + TTRC("Import Dock"), }; const char *EditorFeatureProfile::feature_identifiers[FEATURE_MAX] = { @@ -51,9 +51,9 @@ const char *EditorFeatureProfile::feature_identifiers[FEATURE_MAX] = { "script", "asset_lib", "scene_tree", - "import_dock", "node_dock", - "filesystem_dock" + "filesystem_dock", + "import_dock", }; void EditorFeatureProfile::set_disable_class(const StringName &p_class, bool p_disabled) { @@ -678,9 +678,16 @@ void EditorFeatureProfileManager::_update_selected_profile() { TreeItem *root = class_list->create_item(); TreeItem *features = class_list->create_item(root); + TreeItem *last_feature; features->set_text(0, TTR("Enabled Features:")); for (int i = 0; i < EditorFeatureProfile::FEATURE_MAX; i++) { - TreeItem *feature = class_list->create_item(features); + TreeItem *feature; + if (i == EditorFeatureProfile::FEATURE_IMPORT_DOCK) { + feature = class_list->create_item(last_feature); + } else { + feature = class_list->create_item(features); + last_feature = feature; + } feature->set_cell_mode(0, TreeItem::CELL_MODE_CHECK); feature->set_text(0, TTRGET(EditorFeatureProfile::get_feature_name(EditorFeatureProfile::Feature(i)))); feature->set_selectable(0, true); diff --git a/editor/editor_feature_profile.h b/editor/editor_feature_profile.h index 38413e35a2..d0d08c61f4 100644 --- a/editor/editor_feature_profile.h +++ b/editor/editor_feature_profile.h @@ -49,9 +49,9 @@ public: FEATURE_SCRIPT, FEATURE_ASSET_LIB, FEATURE_SCENE_TREE, - FEATURE_IMPORT_DOCK, FEATURE_NODE_DOCK, FEATURE_FILESYSTEM_DOCK, + FEATURE_IMPORT_DOCK, FEATURE_MAX }; diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 8544bb8856..26281a232b 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -5344,9 +5344,11 @@ void EditorNode::_feature_profile_changed() { TabContainer *node_tabs = cast_to<TabContainer>(node_dock->get_parent()); TabContainer *fs_tabs = cast_to<TabContainer>(filesystem_dock->get_parent()); if (profile.is_valid()) { - import_tabs->set_tab_hidden(import_dock->get_index(), profile->is_feature_disabled(EditorFeatureProfile::FEATURE_IMPORT_DOCK)); node_tabs->set_tab_hidden(node_dock->get_index(), profile->is_feature_disabled(EditorFeatureProfile::FEATURE_NODE_DOCK)); - fs_tabs->set_tab_hidden(filesystem_dock->get_index(), profile->is_feature_disabled(EditorFeatureProfile::FEATURE_FILESYSTEM_DOCK)); + // The Import dock is useless without the FileSystem dock. Ensure the configuration is valid. + bool fs_dock_disabled = profile->is_feature_disabled(EditorFeatureProfile::FEATURE_FILESYSTEM_DOCK); + fs_tabs->set_tab_hidden(filesystem_dock->get_index(), fs_dock_disabled); + import_tabs->set_tab_hidden(import_dock->get_index(), fs_dock_disabled || profile->is_feature_disabled(EditorFeatureProfile::FEATURE_IMPORT_DOCK)); main_editor_buttons[EDITOR_3D]->set_visible(!profile->is_feature_disabled(EditorFeatureProfile::FEATURE_3D)); main_editor_buttons[EDITOR_SCRIPT]->set_visible(!profile->is_feature_disabled(EditorFeatureProfile::FEATURE_SCRIPT)); diff --git a/editor/plugins/editor_debugger_plugin.h b/editor/plugins/editor_debugger_plugin.h index 5536f2daa2..10fd1151de 100644 --- a/editor/plugins/editor_debugger_plugin.h +++ b/editor/plugins/editor_debugger_plugin.h @@ -39,7 +39,7 @@ class EditorDebuggerPlugin : public Control { GDCLASS(EditorDebuggerPlugin, Control); private: - ScriptEditorDebugger *debugger; + ScriptEditorDebugger *debugger = nullptr; void _breaked(bool p_really_did, bool p_can_debug); void _started(); diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp index 762f42abeb..6e722607f7 100644 --- a/editor/plugins/texture_region_editor_plugin.cpp +++ b/editor/plugins/texture_region_editor_plugin.cpp @@ -875,7 +875,7 @@ void TextureRegionEditor::_changed_callback(Object *p_changed, const char *p_pro if (!is_visible()) { return; } - if (p_prop == StringName("atlas") || p_prop == StringName("texture")) { + if (p_prop == StringName("atlas") || p_prop == StringName("texture") || p_prop == StringName("region")) { _edit_region(); } } |