diff options
author | Nong Van Tinh <vannongtinh@gmail.com> | 2023-03-20 14:47:41 +0700 |
---|---|---|
committer | Nong Van Tinh <vannongtinh@gmail.com> | 2023-05-01 08:15:15 +0700 |
commit | f40a5fc3f6bd7df17dd4d426b46a364c85a6330a (patch) | |
tree | 9a9ef221a749aa6636e5d2e0dc56edccde4bb683 /editor/import_dock.cpp | |
parent | 4d5f10fc3ad4e72c22391663c37d1f46510bb291 (diff) | |
download | redot-engine-f40a5fc3f6bd7df17dd4d426b46a364c85a6330a.tar.gz |
Expose 'Reimport' on right-click context menu in the FileSystem panel
Diffstat (limited to 'editor/import_dock.cpp')
-rw-r--r-- | editor/import_dock.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/editor/import_dock.cpp b/editor/import_dock.cpp index b5680f2f2c..824a65c443 100644 --- a/editor/import_dock.cpp +++ b/editor/import_dock.cpp @@ -316,6 +316,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(); |