diff options
author | Jean-Michel Bernard <jmb462@gmail.com> | 2022-02-04 19:08:10 +0100 |
---|---|---|
committer | Jean-Michel Bernard <jmb462@gmail.com> | 2022-02-05 07:06:53 +0100 |
commit | f86ab4031a8d5044ecf2ba79dc40bf6906156a48 (patch) | |
tree | ea96f7ce0c3b7953bf49f3ea1e0123049dee8b99 /editor/script_create_dialog.cpp | |
parent | 8495be9cece924b22a8148ce335d04836027bc40 (diff) | |
download | redot-engine-f86ab4031a8d5044ecf2ba79dc40bf6906156a48.tar.gz |
Fix template OptionButton in create script dialog doesn't select the correct template
Diffstat (limited to 'editor/script_create_dialog.cpp')
-rw-r--r-- | editor/script_create_dialog.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp index 0c916bf56a..cafa12c42e 100644 --- a/editor/script_create_dialog.cpp +++ b/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 { |