diff options
author | Antonioya <blendergit@gmail.com> | 2019-07-28 11:57:26 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2019-07-29 13:13:39 +0300 |
commit | 60d71ffbe99395bbfeed1eb0504b8f52eb84a827 (patch) | |
tree | 4bc55e0da9b4d0a0ee59396f871841dcb5eac046 /source/blender/editors/gpencil | |
parent | 801962e2b6779714917f1b1cf2cd6c161bd53855 (diff) |
Fix T67811: GPencil Weights shift when use dissolve in Edit Mode
The problem was the index was not right calculated for unselected points.
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_edit.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index 779ce27ddf1..f9534b74c04 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -1940,9 +1940,11 @@ static int gp_dissolve_selected_points(bContext *C, eGP_DissolveMode mode) *ndvert = *dvert; ndvert->dw = MEM_dupallocN(dvert->dw); ndvert++; - dvert++; } } + if (gps->dvert != NULL) { + dvert++; + } } break; case GP_DISSOLVE_BETWEEN: @@ -1970,9 +1972,11 @@ static int gp_dissolve_selected_points(bContext *C, eGP_DissolveMode mode) *ndvert = *dvert; ndvert->dw = MEM_dupallocN(dvert->dw); ndvert++; - dvert++; } } + if (gps->dvert != NULL) { + dvert++; + } } /* copy last segment */ (gps->dvert != NULL) ? dvert = gps->dvert + last : NULL; @@ -2001,9 +2005,11 @@ static int gp_dissolve_selected_points(bContext *C, eGP_DissolveMode mode) *ndvert = *dvert; ndvert->dw = MEM_dupallocN(dvert->dw); ndvert++; - dvert++; } } + if (gps->dvert != NULL) { + dvert++; + } } break; } |