Commit ce1fcdc3 authored by twanvl's avatar twanvl

fixed RemoveControlPointAction

parent 95aa7ed0
...@@ -262,7 +262,7 @@ class SinglePointRemoveAction : public Action { ...@@ -262,7 +262,7 @@ class SinglePointRemoveAction : public Action {
SinglePointRemoveAction::SinglePointRemoveAction(const SymbolPartP& part, UInt position) SinglePointRemoveAction::SinglePointRemoveAction(const SymbolPartP& part, UInt position)
: part(part) : part(part)
, position(position) , position(position)
, point (part->getPoint(position - 1)) , point (part->getPoint(position))
, point1(part->getPoint(position - 1)) , point1(part->getPoint(position - 1))
, point2(part->getPoint(position + 1)) , point2(part->getPoint(position + 1))
{ {
...@@ -273,13 +273,13 @@ SinglePointRemoveAction::SinglePointRemoveAction(const SymbolPartP& part, UInt p ...@@ -273,13 +273,13 @@ SinglePointRemoveAction::SinglePointRemoveAction(const SymbolPartP& part, UInt p
// convert both segments to curves first // convert both segments to curves first
if (point1.other.segment_after != SEGMENT_CURVE) { if (point1.other.segment_after != SEGMENT_CURVE) {
point1.other.delta_after = -
before = (point1.other.pos - point->pos) / 3.0; before = (point1.other.pos - point->pos) / 3.0;
point1.other.delta_after = -before;
point1.other.segment_after = SEGMENT_CURVE; point1.other.segment_after = SEGMENT_CURVE;
} }
if (point2.other.segment_before != SEGMENT_CURVE) { if (point2.other.segment_before != SEGMENT_CURVE) {
point2.other.delta_before = - after = (point2.other.pos - point->pos) / 3.0;
after = (point2.other.pos - point->pos) / 3.0; point2.other.delta_before = -after;
point2.other.segment_before = SEGMENT_CURVE; point2.other.segment_before = SEGMENT_CURVE;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment