You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Fix the text editor confusing resource files of class JSON with json files.
This commit is contained in:
@@ -4645,8 +4645,12 @@ bool ScriptEditorPlugin::handles(Object *p_object) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Object::cast_to<JSON>(p_object)) {
|
if (Object::cast_to<JSON>(p_object)) {
|
||||||
|
// This is here to stop resource files of class JSON from getting confused
|
||||||
|
// with json files and being opened in the text editor.
|
||||||
|
if (Object::cast_to<JSON>(p_object)->get_path().get_extension().to_lower() == "json") {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return p_object->is_class("Script");
|
return p_object->is_class("Script");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user