You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Replace find with contains/has where applicable
* Replaces `find(...) != -1` with `contains` for `String` * Replaces `find(...) == -1` with `!contains` for `String` * Replaces `find(...) != -1` with `has` for containers * Replaces `find(...) == -1` with `!has` for containers
This commit is contained in:
@@ -2391,7 +2391,7 @@ void EditorNode::_edit_current(bool p_skip_foreign, bool p_skip_inspector_update
|
||||
Ref<Resource> res = Object::cast_to<Resource>(current_obj);
|
||||
if (p_skip_foreign && res.is_valid()) {
|
||||
const int current_tab = scene_tabs->get_current_tab();
|
||||
if (res->get_path().find("::") > -1 && res->get_path().get_slice("::", 0) != editor_data.get_scene_path(current_tab)) {
|
||||
if (res->get_path().contains("::") && res->get_path().get_slice("::", 0) != editor_data.get_scene_path(current_tab)) {
|
||||
// Trying to edit resource that belongs to another scene; abort.
|
||||
current_obj = nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user