You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-18 14:21:41 +00:00
Small fixes to #13233
This commit is contained in:
@@ -1475,7 +1475,6 @@ void EditorNode::_edit_current() {
|
|||||||
object_menu->set_disabled(true);
|
object_menu->set_disabled(true);
|
||||||
|
|
||||||
bool capitalize = bool(EDITOR_DEF("interface/editor/capitalize_properties", true));
|
bool capitalize = bool(EDITOR_DEF("interface/editor/capitalize_properties", true));
|
||||||
bool expandall = bool(EDITOR_DEF("interface/editor/expand_all_properties", true));
|
|
||||||
bool is_resource = current_obj->is_class("Resource");
|
bool is_resource = current_obj->is_class("Resource");
|
||||||
bool is_node = current_obj->is_class("Node");
|
bool is_node = current_obj->is_class("Node");
|
||||||
resource_save_button->set_disabled(!is_resource);
|
resource_save_button->set_disabled(!is_resource);
|
||||||
@@ -1547,10 +1546,6 @@ void EditorNode::_edit_current() {
|
|||||||
property_editor->set_enable_capitalize_paths(capitalize);
|
property_editor->set_enable_capitalize_paths(capitalize);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (property_editor->is_expand_all_properties_enabled() != expandall) {
|
|
||||||
property_editor->set_use_folding(expandall == false);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Take care of PLUGIN EDITOR */
|
/* Take care of PLUGIN EDITOR */
|
||||||
|
|
||||||
EditorPlugin *main_plugin = editor_data.get_editor(current_obj);
|
EditorPlugin *main_plugin = editor_data.get_editor(current_obj);
|
||||||
|
|||||||
@@ -2665,12 +2665,12 @@ TreeItem *PropertyEditor::get_parent_node(String p_path, HashMap<String, TreeIte
|
|||||||
item->set_editable(1, false);
|
item->set_editable(1, false);
|
||||||
item->set_selectable(1, subsection_selectable);
|
item->set_selectable(1, subsection_selectable);
|
||||||
|
|
||||||
if (use_folding) {
|
if (use_folding || folding_behaviour != FB_UNDEFINED) { // Even if you disabled folding (expand all by default), you still can collapse all manually.
|
||||||
if (!obj->editor_is_section_unfolded(p_path)) {
|
if (!obj->editor_is_section_unfolded(p_path)) {
|
||||||
updating_folding = true;
|
updating_folding = true;
|
||||||
if (folding_behaviour == FB_COLLAPSEALL)
|
if (folding_behaviour == FB_COLLAPSEALL)
|
||||||
item->set_collapsed(true);
|
item->set_collapsed(true);
|
||||||
else if (folding_behaviour == FB_EXPANDALL)
|
else if (folding_behaviour == FB_EXPANDALL || is_expandall_enabled)
|
||||||
item->set_collapsed(false);
|
item->set_collapsed(false);
|
||||||
else
|
else
|
||||||
item->set_collapsed(true);
|
item->set_collapsed(true);
|
||||||
@@ -4310,6 +4310,7 @@ PropertyEditor::PropertyEditor() {
|
|||||||
property_selectable = false;
|
property_selectable = false;
|
||||||
show_type_icons = false; // maybe one day will return.
|
show_type_icons = false; // maybe one day will return.
|
||||||
folding_behaviour = FB_UNDEFINED;
|
folding_behaviour = FB_UNDEFINED;
|
||||||
|
is_expandall_enabled = bool(EDITOR_DEF("interface/editor/expand_all_properties", true));
|
||||||
}
|
}
|
||||||
|
|
||||||
PropertyEditor::~PropertyEditor() {
|
PropertyEditor::~PropertyEditor() {
|
||||||
|
|||||||
@@ -203,6 +203,7 @@ class PropertyEditor : public Control {
|
|||||||
bool hide_script;
|
bool hide_script;
|
||||||
bool use_folding;
|
bool use_folding;
|
||||||
bool property_selectable;
|
bool property_selectable;
|
||||||
|
bool is_expandall_enabled;
|
||||||
|
|
||||||
bool updating_folding;
|
bool updating_folding;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user