summaryrefslogtreecommitdiff
path: root/editor/import_dock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/import_dock.cpp')
-rw-r--r--editor/import_dock.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/editor/import_dock.cpp b/editor/import_dock.cpp
index 3ef88105fe..22f6aedeaa 100644
--- a/editor/import_dock.cpp
+++ b/editor/import_dock.cpp
@@ -112,19 +112,19 @@ void ImportDock::set_edit_path(const String &p_path) {
_update_options(config);
- List<Ref<ResourceImporter> > importers;
+ List<Ref<ResourceImporter>> importers;
ResourceFormatImporter::get_singleton()->get_importers_for_extension(p_path.get_extension(), &importers);
- List<Pair<String, String> > importer_names;
+ List<Pair<String, String>> importer_names;
- for (List<Ref<ResourceImporter> >::Element *E = importers.front(); E; E = E->next()) {
+ for (List<Ref<ResourceImporter>>::Element *E = importers.front(); E; E = E->next()) {
importer_names.push_back(Pair<String, String>(E->get()->get_visible_name(), E->get()->get_importer_name()));
}
- importer_names.sort_custom<PairSort<String, String> >();
+ importer_names.sort_custom<PairSort<String, String>>();
import_as->clear();
- for (List<Pair<String, String> >::Element *E = importer_names.front(); E; E = E->next()) {
+ for (List<Pair<String, String>>::Element *E = importer_names.front(); E; E = E->next()) {
import_as->add_item(E->get().first);
import_as->set_item_metadata(import_as->get_item_count() - 1, E->get().second);
if (E->get().second == params->importer->get_importer_name()) {
@@ -240,19 +240,19 @@ void ImportDock::set_edit_multiple_paths(const Vector<String> &p_paths) {
params->update();
- List<Ref<ResourceImporter> > importers;
+ List<Ref<ResourceImporter>> importers;
ResourceFormatImporter::get_singleton()->get_importers_for_extension(p_paths[0].get_extension(), &importers);
- List<Pair<String, String> > importer_names;
+ List<Pair<String, String>> importer_names;
- for (List<Ref<ResourceImporter> >::Element *E = importers.front(); E; E = E->next()) {
+ for (List<Ref<ResourceImporter>>::Element *E = importers.front(); E; E = E->next()) {
importer_names.push_back(Pair<String, String>(E->get()->get_visible_name(), E->get()->get_importer_name()));
}
- importer_names.sort_custom<PairSort<String, String> >();
+ importer_names.sort_custom<PairSort<String, String>>();
import_as->clear();
- for (List<Pair<String, String> >::Element *E = importer_names.front(); E; E = E->next()) {
+ for (List<Pair<String, String>>::Element *E = importer_names.front(); E; E = E->next()) {
import_as->add_item(E->get().first);
import_as->set_item_metadata(import_as->get_item_count() - 1, E->get().second);
if (E->get().second == params->importer->get_importer_name()) {
@@ -424,7 +424,7 @@ void ImportDock::_reimport_attempt() {
if (need_restart) {
label_warning->set_visible(used_in_resources);
- reimport_confirm->popup_centered_minsize();
+ reimport_confirm->popup_centered();
return;
}
@@ -450,8 +450,8 @@ void ImportDock::_reimport() {
String importer_name = params->importer->get_importer_name();
- if (params->checking) {
- //update only what edited (checkboxes)
+ if (params->checking && config->get_value("remap", "importer") == params->importer->get_importer_name()) {
+ //update only what is edited (checkboxes) if the importer is the same
for (List<PropertyInfo>::Element *E = params->properties.front(); E; E = E->next()) {
if (params->checked.has(E->get().name)) {
config->set_value("params", E->get().name, params->values[E->get().name]);
@@ -492,13 +492,13 @@ void ImportDock::_notification(int p_what) {
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
- imported->add_style_override("normal", get_stylebox("normal", "LineEdit"));
+ imported->add_theme_style_override("normal", get_theme_stylebox("normal", "LineEdit"));
} break;
case NOTIFICATION_ENTER_TREE: {
import_opts->edit(params);
- label_warning->add_color_override("font_color", get_color("warning_color", "Editor"));
+ label_warning->add_theme_color_override("font_color", get_theme_color("warning_color", "Editor"));
} break;
}
}
@@ -526,7 +526,7 @@ ImportDock::ImportDock() {
set_name("Import");
imported = memnew(Label);
- imported->add_style_override("normal", EditorNode::get_singleton()->get_gui_base()->get_stylebox("normal", "LineEdit"));
+ imported->add_theme_style_override("normal", EditorNode::get_singleton()->get_gui_base()->get_theme_stylebox("normal", "LineEdit"));
imported->set_clip_text(true);
add_child(imported);
HBoxContainer *hb = memnew(HBoxContainer);
@@ -558,7 +558,7 @@ ImportDock::ImportDock() {
hb->add_spacer();
reimport_confirm = memnew(ConfirmationDialog);
- reimport_confirm->get_ok()->set_text(TTR("Save scenes, re-import and restart"));
+ reimport_confirm->get_ok()->set_text(TTR("Save Scenes, Re-Import, and Restart"));
add_child(reimport_confirm);
reimport_confirm->connect("confirmed", callable_mp(this, &ImportDock::_reimport_and_restart));