diff options
author | YimingWu <xp8110@outlook.com> | 2022-07-11 05:12:49 +0300 |
---|---|---|
committer | YimingWu <xp8110@outlook.com> | 2022-07-11 05:13:07 +0300 |
commit | d51bc8215f515144ae51cc5feec01b3dbc7900c4 (patch) | |
tree | 6d2c2b6335fa14dae5487f66c3bc290f0054f60a | |
parent | d4a4691c0c395967e7e12d2405b561d1fd0b6365 (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
m--------- | release/scripts/addons | 0 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_gpencil_modifier.c | 2 | ||||
m--------- | source/tools | 0 |
3 files changed, 1 insertions, 1 deletions
diff --git a/release/scripts/addons b/release/scripts/addons -Subproject 403b95ef6ff38918de966ed2a5843cfa3274a58 +Subproject 7ea2e74fc41b2eabdbf639b812082e73823b09d 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; } } diff --git a/source/tools b/source/tools -Subproject 01b4c0e4a172819414229445c314be34527bf41 +Subproject da8bdd7244c7b6c2eadf4c949ff391d0cc43027 |