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:
authorAras Pranckevicius <aras@nesnausk.org>2022-08-03 19:09:21 +0300
committerAras Pranckevicius <aras@nesnausk.org>2022-08-03 19:09:21 +0300
commit10c47349786a1197e66f057f09c0bddab11da583 (patch)
treecea935e58ad0b53950951ed8a1d4bec7d1b838d4 /source/blender/blenloader
parent06b6c004f5fb2cae3c98c93970a64d7231992210 (diff)
Fix T100173: fix missing removal of old name in BLO_update_defaults_startup_blend
If a screen had to be renamed, the old name was not removed from the name map. Fixes T100173.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/versioning_defaults.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index a2e3fd5346e..0749625137a 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -45,6 +45,7 @@
#include "BKE_layer.h"
#include "BKE_lib_id.h"
#include "BKE_main.h"
+#include "BKE_main_namemap.h"
#include "BKE_material.h"
#include "BKE_mesh.h"
#include "BKE_node.h"
@@ -488,6 +489,7 @@ void BLO_update_defaults_startup_blend(Main *bmain, const char *app_template)
if (layout->screen) {
bScreen *screen = layout->screen;
if (!STREQ(screen->id.name + 2, workspace->id.name + 2)) {
+ BKE_main_namemap_remove_name(bmain, &screen->id, screen->id.name + 2);
BLI_strncpy(screen->id.name + 2, workspace->id.name + 2, sizeof(screen->id.name) - 2);
BLI_libblock_ensure_unique_name(bmain, screen->id.name);
}