Skip to content

Commit c5f207f

Browse files
committed
Merge pull request #113554 from akien-mga/vcs-fix-OptionButton-indexing
VCS: Properly use IDs for OptionButton after #113522
2 parents 30fee67 + cabf3bf commit c5f207f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

editor/version_control/version_control_editor_plugin.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ void VersionControlEditorPlugin::_bind_methods() {
6060

6161
void VersionControlEditorPlugin::_create_vcs_metadata_files() {
6262
String dir = "res://";
63-
EditorVCSInterface::create_vcs_metadata_files(EditorVCSInterface::VCSMetadata(metadata_selection->get_selected()), dir);
63+
EditorVCSInterface::create_vcs_metadata_files(EditorVCSInterface::VCSMetadata(metadata_selection->get_selected_id()), dir);
6464
}
6565

6666
void VersionControlEditorPlugin::_notification(int p_what) {
@@ -959,7 +959,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
959959
metadata_selection = memnew(OptionButton);
960960
metadata_selection->set_custom_minimum_size(Size2(100, 20));
961961
metadata_selection->add_item("Git", (int)EditorVCSInterface::VCSMetadata::GIT);
962-
metadata_selection->select((int)EditorVCSInterface::VCSMetadata::GIT);
962+
metadata_selection->select(metadata_selection->get_item_index((int)EditorVCSInterface::VCSMetadata::GIT));
963963
metadata_hb->add_child(metadata_selection);
964964

965965
l = memnew(Label);

0 commit comments

Comments
 (0)