VCS: Properly use IDs for OptionButton after #113522

Fixes #113549.
This commit is contained in:
Rémi Verschelde 2025-12-04 11:52:05 +01:00
parent 63e14e13f9
commit cabf3bfba6
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -60,7 +60,7 @@ void VersionControlEditorPlugin::_bind_methods() {
void VersionControlEditorPlugin::_create_vcs_metadata_files() {
String dir = "res://";
EditorVCSInterface::create_vcs_metadata_files(EditorVCSInterface::VCSMetadata(metadata_selection->get_selected()), dir);
EditorVCSInterface::create_vcs_metadata_files(EditorVCSInterface::VCSMetadata(metadata_selection->get_selected_id()), dir);
}
void VersionControlEditorPlugin::_notification(int p_what) {
@ -959,7 +959,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
metadata_selection = memnew(OptionButton);
metadata_selection->set_custom_minimum_size(Size2(100, 20));
metadata_selection->add_item("Git", (int)EditorVCSInterface::VCSMetadata::GIT);
metadata_selection->select((int)EditorVCSInterface::VCSMetadata::GIT);
metadata_selection->select(metadata_selection->get_item_index((int)EditorVCSInterface::VCSMetadata::GIT));
metadata_hb->add_child(metadata_selection);
l = memnew(Label);