Fix T67811: GPencil Weights shift when use dissolve in Edit Mode

The problem was the index was not right calculated for unselected points.
This commit is contained in:
Antonioya
2019-07-28 10:57:26 +02:00
parent 801962e2b6
commit 60d71ffbe9

View File

@@ -1940,9 +1940,11 @@ static int gp_dissolve_selected_points(bContext *C, eGP_DissolveMode mode)
*ndvert = *dvert; *ndvert = *dvert;
ndvert->dw = MEM_dupallocN(dvert->dw); ndvert->dw = MEM_dupallocN(dvert->dw);
ndvert++; ndvert++;
dvert++;
} }
} }
if (gps->dvert != NULL) {
dvert++;
}
} }
break; break;
case GP_DISSOLVE_BETWEEN: case GP_DISSOLVE_BETWEEN:
@@ -1970,9 +1972,11 @@ static int gp_dissolve_selected_points(bContext *C, eGP_DissolveMode mode)
*ndvert = *dvert; *ndvert = *dvert;
ndvert->dw = MEM_dupallocN(dvert->dw); ndvert->dw = MEM_dupallocN(dvert->dw);
ndvert++; ndvert++;
dvert++;
} }
} }
if (gps->dvert != NULL) {
dvert++;
}
} }
/* copy last segment */ /* copy last segment */
(gps->dvert != NULL) ? dvert = gps->dvert + last : NULL; (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 = *dvert;
ndvert->dw = MEM_dupallocN(dvert->dw); ndvert->dw = MEM_dupallocN(dvert->dw);
ndvert++; ndvert++;
dvert++;
} }
} }
if (gps->dvert != NULL) {
dvert++;
}
} }
break; break;
} }