Fix template OptionButton in create script dialog doesn't select the correct template
This commit is contained in:
parent
8495be9cec
commit
f86ab4031a
1 changed files with 2 additions and 2 deletions
|
@ -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 a new issue