diff options
Diffstat (limited to 'editor/inspector_dock.cpp')
-rw-r--r-- | editor/inspector_dock.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/editor/inspector_dock.cpp b/editor/inspector_dock.cpp index 74fdbdebd7..27b261f320 100644 --- a/editor/inspector_dock.cpp +++ b/editor/inspector_dock.cpp @@ -227,7 +227,7 @@ void InspectorDock::_load_resource(const String &p_type) { load_resource_dialog->add_filter("*." + extensions[i], extensions[i].to_upper()); } - const Vector<String> textfile_ext = ((String)(EditorSettings::get_singleton()->get("docks/filesystem/textfile_extensions"))).split(",", false); + const Vector<String> textfile_ext = ((String)(EDITOR_GET("docks/filesystem/textfile_extensions"))).split(",", false); for (int i = 0; i < textfile_ext.size(); i++) { load_resource_dialog->add_filter("*." + textfile_ext[i], textfile_ext[i].to_upper()); } @@ -240,7 +240,7 @@ void InspectorDock::_resource_file_selected(String p_file) { if (ResourceLoader::exists(p_file, "")) { res = ResourceLoader::load(p_file); } else { - const Vector<String> textfile_ext = ((String)(EditorSettings::get_singleton()->get("docks/filesystem/textfile_extensions"))).split(",", false); + const Vector<String> textfile_ext = ((String)(EDITOR_GET("docks/filesystem/textfile_extensions"))).split(",", false); if (textfile_ext.has(p_file.get_extension())) { res = ScriptEditor::get_singleton()->open_file(p_file); } @@ -255,8 +255,8 @@ void InspectorDock::_resource_file_selected(String p_file) { } void InspectorDock::_save_resource(bool save_as) { - ObjectID current = EditorNode::get_singleton()->get_editor_selection_history()->get_current(); - Object *current_obj = current.is_valid() ? ObjectDB::get_instance(current) : nullptr; + ObjectID current_id = EditorNode::get_singleton()->get_editor_selection_history()->get_current(); + Object *current_obj = current_id.is_valid() ? ObjectDB::get_instance(current_id) : nullptr; ERR_FAIL_COND(!Object::cast_to<Resource>(current_obj)); @@ -270,8 +270,8 @@ void InspectorDock::_save_resource(bool save_as) { } void InspectorDock::_unref_resource() { - ObjectID current = EditorNode::get_singleton()->get_editor_selection_history()->get_current(); - Object *current_obj = current.is_valid() ? ObjectDB::get_instance(current) : nullptr; + ObjectID current_id = EditorNode::get_singleton()->get_editor_selection_history()->get_current(); + Object *current_obj = current_id.is_valid() ? ObjectDB::get_instance(current_id) : nullptr; ERR_FAIL_COND(!Object::cast_to<Resource>(current_obj)); @@ -281,8 +281,8 @@ void InspectorDock::_unref_resource() { } void InspectorDock::_copy_resource() { - ObjectID current = EditorNode::get_singleton()->get_editor_selection_history()->get_current(); - Object *current_obj = current.is_valid() ? ObjectDB::get_instance(current) : nullptr; + ObjectID current_id = EditorNode::get_singleton()->get_editor_selection_history()->get_current(); + Object *current_obj = current_id.is_valid() ? ObjectDB::get_instance(current_id) : nullptr; ERR_FAIL_COND(!Object::cast_to<Resource>(current_obj)); @@ -610,8 +610,8 @@ void InspectorDock::apply_script_properties(Object *p_object) { } for (const Pair<StringName, Variant> &E : stored_properties) { - Variant current; - if (si->get(E.first, current) && current.get_type() == E.second.get_type()) { + Variant current_prop; + if (si->get(E.first, current_prop) && current_prop.get_type() == E.second.get_type()) { si->set(E.first, E.second); } } |