Fix: Do not show WM_OT_clear_recent_files on Splash #116785

Merged
Harley Acheson merged 1 commits from Brainzman/blender:fix-splash-screen-regression into main 2024-01-04 17:50:13 +01:00
2 changed files with 5 additions and 6 deletions

View File

@ -7310,11 +7310,6 @@ int uiTemplateRecentFiles(uiLayout *layout, int rows)
but, uiTemplateRecentFiles_tooltip_func, BLI_strdup(recent->filepath), MEM_freeN);
}
if (i > 0) {
uiItemS(layout);
uiItemO(layout, nullptr, ICON_TRASH, "WM_OT_clear_recent_files");
}
return i;
}

View File

@ -190,7 +190,11 @@ static void recent_files_menu_draw(const bContext * /*C*/, Menu *menu)
{
uiLayout *layout = menu->layout;
uiLayoutSetOperatorContext(layout, WM_OP_INVOKE_DEFAULT);
if (uiTemplateRecentFiles(layout, U.recent_files) == 0) {
if (uiTemplateRecentFiles(layout, U.recent_files) != 0) {
uiItemS(layout);
uiItemO(layout, nullptr, ICON_TRASH, "WM_OT_clear_recent_files");
}
else {
uiItemL(layout, IFACE_("No Recent Files"), ICON_NONE);
}
}