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:
authorYimingWu <xp8110@outlook.com>2022-07-11 05:12:49 +0300
committerYimingWu <xp8110@outlook.com>2022-07-11 05:13:07 +0300
commitd51bc8215f515144ae51cc5feec01b3dbc7900c4 (patch)
tree6d2c2b6335fa14dae5487f66c3bc290f0054f60a /source/blender/makesrna/intern
parentd4a4691c0c395967e7e12d2405b561d1fd0b6365 (diff)
GPencil: Dot-dash modifier rename segment bug fix.
This patch fixes naming and renaming issue with dot-dash modifier segment list. Before: when double clicking and exiting it would append number at the end regardless of name being changed or not. Now it works like in other areas. Authored by: Aleš Jelovčan (frogstomp) Reviewed By: YimingWu (NicksBest) Differential Revision: https://developer.blender.org/D15359
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r--source/blender/makesrna/intern/rna_gpencil_modifier.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_gpencil_modifier.c b/source/blender/makesrna/intern/rna_gpencil_modifier.c
index dccf7d7a7a9..d3e1aab1ba0 100644
--- a/source/blender/makesrna/intern/rna_gpencil_modifier.c
+++ b/source/blender/makesrna/intern/rna_gpencil_modifier.c
@@ -774,7 +774,7 @@ static bool dash_segment_name_exists_fn(void *arg, const char *name)
{
const DashGpencilModifierData *dmd = (const DashGpencilModifierData *)arg;
for (int i = 0; i < dmd->segments_len; i++) {
- if (STREQ(dmd->segments[i].name, name)) {
+ if (STREQ(dmd->segments[i].name, name) && dmd->segments[i].name != name) {
return true;
}
}