fixed RemoveControlPointAction

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@206 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-02-13 22:23:41 +00:00
parent 719b893354
commit 4e88ff8cf0
+4 -4
View File
@@ -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
// 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;
} }