summaryrefslogtreecommitdiffstats
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/SCsub3
-rw-r--r--editor/editor_help.cpp3
-rw-r--r--editor/editor_node.cpp5
-rw-r--r--editor/filesystem_dock.cpp19
-rw-r--r--editor/property_editor.cpp5
-rw-r--r--editor/property_editor.h1
6 files changed, 24 insertions, 12 deletions
diff --git a/editor/SCsub b/editor/SCsub
index 8a0e36b4a3..8f87e12cb9 100644
--- a/editor/SCsub
+++ b/editor/SCsub
@@ -474,8 +474,7 @@ if env['tools']:
SConscript('import/SCsub')
SConscript('plugins/SCsub')
- lib = env.Library("editor", env.editor_sources)
- env.NoCache(lib)
+ lib = env.add_library("editor", env.editor_sources)
env.Prepend(LIBS=[lib])
Export('env')
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index 4b372e7afd..5fc27c2e3c 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -433,12 +433,11 @@ void EditorHelpIndex::_update_class_list() {
while (type != "") {
if (filter.is_subsequence_ofi(type)) {
- if (to_select.empty()) {
+ if (to_select.empty() || type.length() < to_select.length()) {
to_select = type;
}
found = true;
- break;
}
type = EditorHelp::get_doc_data()->class_list[type].inherits;
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index b5c7187b81..fbf6c86c35 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -1475,7 +1475,6 @@ void EditorNode::_edit_current() {
object_menu->set_disabled(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_node = current_obj->is_class("Node");
resource_save_button->set_disabled(!is_resource);
@@ -1547,10 +1546,6 @@ void EditorNode::_edit_current() {
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 */
EditorPlugin *main_plugin = editor_data.get_editor(current_obj);
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index a5445ca153..9fe3e2ad25 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -781,6 +781,20 @@ void FileSystemDock::_try_move_item(const FileOrFolder &p_item, const String &p_
}
}
+ // update scene if it is open
+ for (int i = 0; i < changed_paths.size(); ++i) {
+ String new_item_path = p_item.is_file ? new_path : changed_paths[i].replace_first(old_path, new_path);
+ if (ResourceLoader::get_resource_type(new_item_path) == "PackedScene" && editor->is_scene_open(changed_paths[i])) {
+ EditorData *ed = &editor->get_editor_data();
+ for (int j = 0; j < ed->get_edited_scene_count(); j++) {
+ if (ed->get_scene_path(j) == changed_paths[i]) {
+ ed->get_edited_scene_root(j)->set_filename(new_item_path);
+ break;
+ }
+ }
+ }
+ }
+
//Only treat as a changed dependency if it was successfully moved
for (int i = 0; i < changed_paths.size(); ++i) {
p_renames[changed_paths[i]] = changed_paths[i].replace_first(old_path, new_path);
@@ -803,7 +817,10 @@ void FileSystemDock::_update_dependencies_after_move(const Map<String, String> &
String file = p_renames.has(remaps[i]) ? p_renames[remaps[i]] : remaps[i];
print_line("Remapping dependencies for: " + file);
Error err = ResourceLoader::rename_dependencies(file, p_renames);
- if (err != OK) {
+ if (err == OK) {
+ if (ResourceLoader::get_resource_type(file) == "PackedScene")
+ editor->reload_scene(file);
+ } else {
EditorNode::get_singleton()->add_io_error(TTR("Unable to update dependencies:\n") + remaps[i] + "\n");
}
}
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp
index d383e54f05..d573a44cdd 100644
--- a/editor/property_editor.cpp
+++ b/editor/property_editor.cpp
@@ -2665,12 +2665,12 @@ TreeItem *PropertyEditor::get_parent_node(String p_path, HashMap<String, TreeIte
item->set_editable(1, false);
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)) {
updating_folding = true;
if (folding_behaviour == FB_COLLAPSEALL)
item->set_collapsed(true);
- else if (folding_behaviour == FB_EXPANDALL)
+ else if (folding_behaviour == FB_EXPANDALL || is_expandall_enabled)
item->set_collapsed(false);
else
item->set_collapsed(true);
@@ -4310,6 +4310,7 @@ PropertyEditor::PropertyEditor() {
property_selectable = false;
show_type_icons = false; // maybe one day will return.
folding_behaviour = FB_UNDEFINED;
+ is_expandall_enabled = bool(EDITOR_DEF("interface/editor/expand_all_properties", true));
}
PropertyEditor::~PropertyEditor() {
diff --git a/editor/property_editor.h b/editor/property_editor.h
index 299e8d3cd7..a337a05e46 100644
--- a/editor/property_editor.h
+++ b/editor/property_editor.h
@@ -203,6 +203,7 @@ class PropertyEditor : public Control {
bool hide_script;
bool use_folding;
bool property_selectable;
+ bool is_expandall_enabled;
bool updating_folding;