Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2021-01-21 23:40:25 +0300
committerJulian Eisel <julian@blender.org>2021-01-22 00:23:43 +0300
commitca475479eb26b4798857b4e67f03eea89324da4b (patch)
tree029cf44f54840f526b5fb85f5f073280d10f24d9 /source/blender/makesdna/DNA_space_types.h
parent41982af6a0fc8e11cf004a356f97222d7eb72c02 (diff)
Fix Asset Browser showing old name after renaming data-block
The "Current File" asset library didn't get refreshed after the data-block name changed. But rather than entirely refreshing the file list, or doing possibly problematic partial refreshes, reference the data-block name directly, so a simple redraw gets the new name displayed. Addresses T83751
Diffstat (limited to 'source/blender/makesdna/DNA_space_types.h')
-rw-r--r--source/blender/makesdna/DNA_space_types.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index a1ccf11b8e3..51f8b58da62 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -1087,6 +1087,8 @@ typedef struct FileDirEntry {
struct FileDirEntry *next, *prev;
int uuid[4];
+ /* Name needs freeing if FILE_ENTRY_NAME_FREE is set. Otherwise this is a direct pointer to a
+ * name buffer. */
char *name;
char *description;
@@ -1165,6 +1167,7 @@ enum {
/* FileDirEntry.flags */
enum {
FILE_ENTRY_INVALID_PREVIEW = 1 << 0, /* The preview for this entry could not be generated. */
+ FILE_ENTRY_NAME_FREE = 1 << 1,
};
/** \} */