소스 검색

Merge pull request #57635 from jmb462/fix-template-optionbutton

Fix OptionButton in create script dialog doesn't select the correct template
Rémi Verschelde 3 년 전
부모
커밋
2e44778cd2
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      editor/script_create_dialog.cpp

+ 2 - 2
editor/script_create_dialog.cpp

@@ -763,10 +763,10 @@ void ScriptCreateDialog::_update_dialog() {
 }
 
 ScriptLanguage::ScriptTemplate ScriptCreateDialog::_get_current_template() const {
-	int selected_id = template_menu->get_selected_id();
+	int selected_index = template_menu->get_selected();
 	for (const ScriptLanguage::ScriptTemplate &t : template_list) {
 		if (is_using_templates) {
-			if (t.id == selected_id) {
+			if (t.id == selected_index) {
 				return t;
 			}
 		} else {