File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -550,9 +550,6 @@ int64_t Keyframe::GetCount() {
550550
551551// Remove a point by matching a coordinate
552552void Keyframe::RemovePoint (Point p) {
553- // mark as dirty
554- needs_update = true ;
555-
556553 // loop through points, and find a matching coordinate
557554 for (int64_t x = 0 ; x < Points.size (); x++) {
558555 // Get each point
@@ -562,6 +559,8 @@ void Keyframe::RemovePoint(Point p) {
562559 if (p.co .X == existing_point.co .X && p.co .Y == existing_point.co .Y ) {
563560 // Remove the matching point, and break out of loop
564561 Points.erase (Points.begin () + x);
562+ // mark as dirty
563+ needs_update = true ;
565564 return ;
566565 }
567566 }
@@ -572,12 +571,11 @@ void Keyframe::RemovePoint(Point p) {
572571
573572// Remove a point by index
574573void Keyframe::RemovePoint (int64_t index) {
575- // mark as dirty
576- needs_update = true ;
577-
578574 // Is index a valid point?
579575 if (index >= 0 && index < Points.size ())
580576 {
577+ // mark as dirty
578+ needs_update = true ;
581579 // Remove a specific point by index
582580 Points.erase (Points.begin () + index);
583581 }
You can’t perform that action at this time.
0 commit comments