Add correct class selection in Select VCS menu

This commit is contained in:
Twarit 2019-09-14 21:06:52 +05:30
parent 24e1039eb6
commit 50da1b7d15
1 changed files with 13 additions and 1 deletions

View File

@ -381,7 +381,19 @@ void VersionControlEditorPlugin::register_editor() {
void VersionControlEditorPlugin::fetch_available_vcs_addon_names() {
ScriptServer::get_global_class_list(&available_addons);
List<StringName> global_classes;
ScriptServer::get_global_class_list(&global_classes);
for (int i = 0; i != global_classes.size(); i++) {
String path = ScriptServer::get_global_class_path(global_classes[i]);
Ref<Script> script = ResourceLoader::load(path);
if (script->get_instance_base_type() == "EditorVCSInterface") {
available_addons.push_back(global_classes[i]);
}
}
}
void VersionControlEditorPlugin::clear_stage_area() {