Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_file/space_file.c
| Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| SpaceFile *sfile = (SpaceFile *)sa->spacedata.first; | SpaceFile *sfile = (SpaceFile *)sa->spacedata.first; | ||||
| /* context changes */ | /* context changes */ | ||||
| switch (wmn->category) { | switch (wmn->category) { | ||||
| case NC_SPACE: | case NC_SPACE: | ||||
| switch (wmn->data) { | switch (wmn->data) { | ||||
| case ND_SPACE_FILE_LIST: | case ND_SPACE_FILE_LIST: | ||||
| ED_file_init(); | |||||
Severin: Is this really needed?
It makes Blender re-read all file icons from disk, which is not totally… | |||||
| ED_area_tag_refresh(sa); | ED_area_tag_refresh(sa); | ||||
| break; | break; | ||||
| case ND_SPACE_FILE_PARAMS: | case ND_SPACE_FILE_PARAMS: | ||||
| ED_area_tag_refresh(sa); | ED_area_tag_refresh(sa); | ||||
| break; | break; | ||||
| case ND_SPACE_FILE_PREVIEW: | case ND_SPACE_FILE_PREVIEW: | ||||
| if (sfile->files && filelist_cache_previews_update(sfile->files)) { | if (sfile->files && filelist_cache_previews_update(sfile->files)) { | ||||
| ED_area_tag_refresh(sa); | ED_area_tag_refresh(sa); | ||||
| ▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines | |||||
Is this really needed?
It makes Blender re-read all file icons from disk, which is not totally cheap, but should be entirely unnecessary (since it's already been done on startup).
Worse, it causes to re-read the icons without freeing the old ones first. Causes a memory leak of 95MB here :)