summaryrefslogtreecommitdiffstats
path: root/editor/import_dock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/import_dock.cpp')
-rw-r--r--editor/import_dock.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/import_dock.cpp b/editor/import_dock.cpp
index 72cc33048c..9f1daac69f 100644
--- a/editor/import_dock.cpp
+++ b/editor/import_dock.cpp
@@ -128,7 +128,7 @@ void ImportDock::set_edit_path(const String &p_path) {
for (const Pair<String, String> &E : importer_names) {
import_as->add_item(E.first);
- import_as->set_item_metadata(import_as->get_item_count() - 1, E.second);
+ import_as->set_item_metadata(-1, E.second);
if (E.second == importer_name) {
import_as->select(import_as->get_item_count() - 1);
}
@@ -149,7 +149,7 @@ void ImportDock::set_edit_path(const String &p_path) {
void ImportDock::_add_keep_import_option(const String &p_importer_name) {
import_as->add_separator();
import_as->add_item(TTR("Keep File (No Import)"));
- import_as->set_item_metadata(import_as->get_item_count() - 1, "keep");
+ import_as->set_item_metadata(-1, "keep");
if (p_importer_name == "keep") {
import_as->select(import_as->get_item_count() - 1);
}
@@ -286,7 +286,7 @@ void ImportDock::set_edit_multiple_paths(const Vector<String> &p_paths) {
for (const Pair<String, String> &E : importer_names) {
import_as->add_item(E.first);
- import_as->set_item_metadata(import_as->get_item_count() - 1, E.second);
+ import_as->set_item_metadata(-1, E.second);
if (E.second == params->importer->get_importer_name()) {
import_as->select(import_as->get_item_count() - 1);
}