Fix incorrect number of recent items displayed in splash

After recent code cleanup in rB349eebd7.
This commit is contained in:
Brecht Van Lommel 2020-08-19 12:26:49 +02:00
parent c5d33070fd
commit 5549ee2e08
1 changed files with 4 additions and 4 deletions

View File

@ -7361,6 +7361,10 @@ int uiTemplateRecentFiles(uiLayout *layout, int rows)
{
int i;
LISTBASE_FOREACH_INDEX (RecentFile *, recent, &G.recent_files, i) {
if (i >= rows) {
break;
}
const char *filename = BLI_path_basename(recent->filepath);
PointerRNA ptr;
uiItemFullO(layout,
@ -7373,10 +7377,6 @@ int uiTemplateRecentFiles(uiLayout *layout, int rows)
&ptr);
RNA_string_set(&ptr, "filepath", recent->filepath);
RNA_boolean_set(&ptr, "display_file_selector", false);
if (i > rows) {
break;
}
}
return i;