Fix path typo for editor def capitalize_properties

This commit is contained in:
Guilherme Felipe 2018-06-14 15:36:38 -03:00
parent 4da621603e
commit 3511a7ac7e
4 changed files with 15 additions and 3 deletions

View file

@ -1654,6 +1654,10 @@ void EditorInspector::set_use_folding(bool p_enable) {
update_tree();
}
bool EditorInspector::is_using_folding() {
return use_folding;
}
void EditorInspector::collapse_all_folding() {
for (List<EditorInspectorSection *>::Element *E = sections.front(); E; E = E->next()) {

View file

@ -314,6 +314,7 @@ public:
void set_property_selectable(bool p_selectable);
void set_use_folding(bool p_enable);
bool is_using_folding();
void collapse_all_folding();
void expand_all_folding();

View file

@ -1381,7 +1381,8 @@ void EditorNode::_edit_current() {
return;
}
bool capitalize = bool(EDITOR_DEF("interface/editor/capitalize_properties", true));
bool capitalize = bool(EDITOR_GET("interface/inspector/capitalize_properties"));
bool disable_folding = bool(EDITOR_GET("interface/inspector/disable_folding"));
bool is_resource = current_obj->is_class("Resource");
bool is_node = current_obj->is_class("Node");
@ -1437,6 +1438,7 @@ void EditorNode::_edit_current() {
if (current_obj->is_class("ScriptEditorDebuggerInspectedObject")) {
editable_warning = TTR("This is a remote object so changes to it will not be kept.\nPlease read the documentation relevant to debugging to better understand this workflow.");
capitalize = false;
disable_folding = true;
}
get_inspector()->edit(current_obj);
@ -1449,6 +1451,10 @@ void EditorNode::_edit_current() {
get_inspector()->set_enable_capitalize_paths(capitalize);
}
if (get_inspector()->is_using_folding() == disable_folding) {
get_inspector()->set_use_folding(!disable_folding);
}
/* Take care of PLUGIN EDITOR */
EditorPlugin *main_plugin = editor_data.get_editor(current_obj);
@ -4637,6 +4643,7 @@ EditorNode::EditorNode() {
EDITOR_DEF("interface/scene_tabs/restore_scenes_on_load", false);
EDITOR_DEF("interface/scene_tabs/show_thumbnail_on_hover", true);
EDITOR_DEF("interface/inspector/capitalize_properties", true);
EDITOR_DEF("interface/inspector/disable_folding", false);
EDITOR_DEF("interface/inspector/open_resources_in_new_inspector", false);
EDITOR_DEF("run/auto_save/save_before_running", true);

View file

@ -553,8 +553,8 @@ InspectorDock::InspectorDock(EditorNode *p_editor, EditorData &p_editor_data) {
inspector->set_v_size_flags(Control::SIZE_EXPAND_FILL);
inspector->set_use_doc_hints(true);
inspector->set_hide_script(false);
inspector->set_enable_capitalize_paths(bool(EDITOR_DEF("interface/editor/capitalize_properties", true)));
inspector->set_use_folding(!bool(EDITOR_DEF("interface/editor/disable_inspector_folding", false)));
inspector->set_enable_capitalize_paths(bool(EDITOR_GET("interface/inspector/capitalize_properties")));
inspector->set_use_folding(!bool(EDITOR_GET("interface/inspector/disable_folding")));
inspector->register_text_enter(search);
inspector->set_undo_redo(&editor_data->get_undo_redo());