Merge pull request #33529 from code-xD/master
fixes #33439. The feature now changes according to the feature profile.
This commit is contained in:
commit
5f4ab5c77d
|
@ -1038,7 +1038,6 @@ void SceneTreeDock::_node_collapsed(Object *p_obj) {
|
|||
void SceneTreeDock::_notification(int p_what) {
|
||||
|
||||
switch (p_what) {
|
||||
|
||||
case NOTIFICATION_READY: {
|
||||
|
||||
if (!first_enter)
|
||||
|
@ -1099,8 +1098,7 @@ void SceneTreeDock::_notification(int p_what) {
|
|||
button_2d->set_text(TTR("2D Scene"));
|
||||
button_2d->set_icon(get_icon("Node2D", "EditorIcons"));
|
||||
button_2d->connect("pressed", this, "_tool_selected", make_binds(TOOL_CREATE_2D_SCENE, false));
|
||||
|
||||
Button *button_3d = memnew(Button);
|
||||
button_3d = memnew(Button);
|
||||
beginner_node_shortcuts->add_child(button_3d);
|
||||
button_3d->set_text(TTR("3D Scene"));
|
||||
button_3d->set_icon(get_icon("Spatial", "EditorIcons"));
|
||||
|
@ -2752,12 +2750,15 @@ void SceneTreeDock::_feature_profile_changed() {
|
|||
|
||||
profile_allow_editing = !profile->is_feature_disabled(EditorFeatureProfile::FEATURE_SCENE_TREE);
|
||||
profile_allow_script_editing = !profile->is_feature_disabled(EditorFeatureProfile::FEATURE_SCRIPT);
|
||||
bool profile_allow_3d = !profile->is_feature_disabled(EditorFeatureProfile::FEATURE_3D);
|
||||
|
||||
button_3d->set_visible(profile_allow_3d);
|
||||
button_add->set_visible(profile_allow_editing);
|
||||
button_instance->set_visible(profile_allow_editing);
|
||||
scene_tree->set_can_rename(profile_allow_editing);
|
||||
|
||||
} else {
|
||||
button_3d->set_visible(true);
|
||||
button_add->set_visible(true);
|
||||
button_instance->set_visible(true);
|
||||
scene_tree->set_can_rename(true);
|
||||
|
|
|
@ -112,6 +112,8 @@ class SceneTreeDock : public VBoxContainer {
|
|||
ToolButton *button_create_script;
|
||||
ToolButton *button_clear_script;
|
||||
|
||||
Button *button_3d;
|
||||
|
||||
HBoxContainer *button_hb;
|
||||
ToolButton *edit_local, *edit_remote;
|
||||
SceneTreeEditor *scene_tree;
|
||||
|
|
Loading…
Reference in New Issue