Fix: Handle Deleted Files in the Recent List

Handle items in the Open Recent list being unavailable. Keep current
overall behavior, but show "File Not Found" on the tooltip.

Pull Request: https://projects.blender.org/blender/blender/pulls/117139
This commit is contained in:
Harley Acheson
2024-01-15 19:23:01 +01:00
committed by Harley Acheson
parent 3e76a1a6c2
commit dc18622572

View File

@@ -7203,6 +7203,12 @@ static void uiTemplateRecentFiles_tooltip_func(bContext * /*C*/, uiTooltipData *
UI_tooltip_text_field_add(tip, BLI_strdup(root), nullptr, UI_TIP_STYLE_HEADER, UI_TIP_LC_NORMAL);
UI_tooltip_text_field_add(tip, nullptr, nullptr, UI_TIP_STYLE_SPACER, UI_TIP_LC_NORMAL);
if (!BLI_exists(path)) {
UI_tooltip_text_field_add(
tip, BLI_strdup(N_("File Not Found")), nullptr, UI_TIP_STYLE_NORMAL, UI_TIP_LC_ALERT);
return;
}
/* Blender version. */
char version_st[128] = {0};
/* Load the thumbnail from cache if existing, but don't create if not. */