Merge pull request #75137 from nongvantinh/implement-6320

Expose 'Reimport' on right-click context menu in the FileSystem panel
This commit is contained in:
Rémi Verschelde 2023-08-07 14:43:44 +02:00
commit bbfa74a991
No known key found for this signature in database
GPG key ID: C3336907360768E1
3 changed files with 48 additions and 7 deletions

View file

@ -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();