mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Make the Import dock depend on the FileSystem dock
(cherry picked from commit de6f8f9d21)
This commit is contained in:
committed by
Rémi Verschelde
parent
e24b9f0520
commit
76a8458753
@@ -5515,10 +5515,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));
|
||||
|
||||
Reference in New Issue
Block a user