mirror of
https://github.com/godotengine/godot.git
synced 2024-12-15 10:12:40 +08:00
Merge pull request #57635 from jmb462/fix-template-optionbutton
Fix OptionButton in create script dialog doesn't select the correct template
This commit is contained in:
commit
2e44778cd2
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user