summaryrefslogtreecommitdiffstats
path: root/editor/import_dock.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-08-07 14:43:44 +0200
committerRémi Verschelde <rverschelde@gmail.com>2023-08-07 14:43:44 +0200
commitbbfa74a991fbb4778e2639b40da7eb24fee7f13c (patch)
tree967b3d221289b08d3d40091c1f0fe622bda5328e /editor/import_dock.cpp
parent40f116f489eb2ce88639204d67dbdec4210fb0d6 (diff)
parentf40a5fc3f6bd7df17dd4d426b46a364c85a6330a (diff)
downloadredot-engine-bbfa74a991fbb4778e2639b40da7eb24fee7f13c.tar.gz
Merge pull request #75137 from nongvantinh/implement-6320
Expose 'Reimport' on right-click context menu in the FileSystem panel
Diffstat (limited to 'editor/import_dock.cpp')
-rw-r--r--editor/import_dock.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/editor/import_dock.cpp b/editor/import_dock.cpp
index a17f497725..fcd2d8f908 100644
--- a/editor/import_dock.cpp
+++ b/editor/import_dock.cpp
@@ -324,6 +324,21 @@ void ImportDock::set_edit_multiple_paths(const Vector<String> &p_paths) {
}
}
+void ImportDock::reimport_resources(const Vector<String> &p_paths) {
+ switch (p_paths.size()) {
+ case 0:
+ ERR_FAIL_MSG("You need to select files to reimport them.");
+ case 1:
+ set_edit_path(p_paths[0]);
+ break;
+ default:
+ set_edit_multiple_paths(p_paths);
+ break;
+ }
+
+ _reimport_attempt();
+}
+
void ImportDock::_update_preset_menu() {
preset->get_popup()->clear();