Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_file/filesel.c
| Show First 20 Lines • Show All 659 Lines • ▼ Show 20 Lines | void ED_fileselect_params_to_userdef(SpaceFile *sfile, | ||||
| } | } | ||||
| /* Tag prefs as dirty if something has changed. */ | /* Tag prefs as dirty if something has changed. */ | ||||
| if (memcmp(sfile_udata_new, &sfile_udata_old, sizeof(sfile_udata_old)) != 0) { | if (memcmp(sfile_udata_new, &sfile_udata_old, sizeof(sfile_udata_old)) != 0) { | ||||
| U.runtime.is_dirty = true; | U.runtime.is_dirty = true; | ||||
| } | } | ||||
| } | } | ||||
| void fileselect_file_set(SpaceFile *sfile, const int index) | void fileselect_file_set(struct bContext *C, SpaceFile *sfile, const int index) | ||||
| { | { | ||||
| const struct FileDirEntry *file = filelist_file(sfile->files, index); | const struct FileDirEntry *file = filelist_file(sfile->files, index); | ||||
| if (file && file->relpath && file->relpath[0] && !(file->typeflag & FILE_TYPE_DIR)) { | if (file && file->relpath && file->relpath[0] && !(file->typeflag & FILE_TYPE_DIR)) { | ||||
| FileSelectParams *params = ED_fileselect_get_active_params(sfile); | FileSelectParams *params = ED_fileselect_get_active_params(sfile); | ||||
| BLI_strncpy(params->file, file->relpath, FILE_MAXFILE); | BLI_strncpy(params->file, file->relpath, FILE_MAXFILE); | ||||
| if (sfile->op) { | |||||
| /* Update the filepath properties of the operator. */ | |||||
| Main *bmain = CTX_data_main(C); | |||||
| file_sfile_to_operator(C, bmain, sfile->op, sfile); | |||||
cmbasnett: Note to reviewer: without this line, navigating the file browser dialog using the arrow keys… | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| int ED_fileselect_layout_numfiles(FileLayout *layout, ARegion *region) | int ED_fileselect_layout_numfiles(FileLayout *layout, ARegion *region) | ||||
| { | { | ||||
| int numfiles; | int numfiles; | ||||
| /* Values in pixels. | /* Values in pixels. | ||||
| ▲ Show 20 Lines • Show All 727 Lines • Show Last 20 Lines | |||||
Note to reviewer: without this line, navigating the file browser dialog using the arrow keys would not update the operator properties.