/// <summary>
        /// Rollback this operation (occurs when a user undoes the last edit).
        /// </summary>
        internal override void Undo()
        {
            base.OnRollback();

            // Get rid of the observation
            m_Direction.OnRollback(this);

            // Cut direct refs made by this operation.
            if (m_Line != null)
            {
                m_Line.CutOp(this);
            }

            if (m_CloseTo != null)
            {
                m_CloseTo.CutOp(this);
            }

            // Undo the intersect point and any lines
            Rollback(m_Intersection);
            Rollback(m_DirLine);
            Rollback(m_LineA);
            Rollback(m_LineB);

            // If we actually did a split, re-activate the original line.
            if (m_LineA != null || m_LineB != null)
            {
                m_LineA = null;
                m_LineB = null;
                m_Line.Restore();
            }
        }
        /// <summary>
        /// Rollback this operation (occurs when a user undoes the last edit).
        /// </summary>
        internal override void Undo()
        {
            base.OnRollback();

            if (IsPrimaryFace)
            {
                m_Line.CutOp(this);
            }

            // Go through each section we created, marking each one as
            // deleted. Also mark the point features at the start of each
            // section, so long as it was created by this operation (should
            // do nothing for the 1st section).

            Feature[] fa = m_Face.GetFeaturesCreatedBy(this);
            foreach (Feature f in fa)
            {
                f.Undo();
            }

            // Restore the original line so long as this is the primary face
            if (IsPrimaryFace)
            {
                m_Line.Restore();
            }
        }
        /// <summary>
        /// Rollback this operation (occurs when a user undoes the last edit).
        /// </summary>
        internal override void Undo()
        {
            base.OnRollback();

            // If the offset was an offset point, get rid of reference to this op.
            m_Offset.OnRollback(this);

            // Cut the reference from the reference line to this op. And
            // refs from any terminal lines.
            if (m_RefLine != null)
            {
                m_RefLine.CutOp(this);
            }

            if (m_Term1 != null)
            {
                m_Term1.CutOp(this);
            }

            if (m_Term2 != null)
            {
                m_Term2.CutOp(this);
            }

            // Rollback the points at the end of the parallel (if they
            // were created by this operation).
            Rollback(CreatedStartPoint);
            Rollback(CreatedEndPoint);


            // Mark the parallel line as deleted.
            Rollback(m_ParLine);
        }
Exemple #4
0
        /// <summary>
        /// Rollback this operation (occurs when a user undoes the last edit).
        /// </summary>
        internal override void Undo()
        {
            base.OnRollback();

            // Cut the reference to this op from the line that we extended.
            m_ExtendLine.CutOp(this);

            // Undo the extension point and any extension line
            Rollback(m_NewPoint);
            Rollback(m_NewLine);
        }
        /// <summary>
        /// Rollback this operation (occurs when a user undoes the last edit).
        /// </summary>
        internal override void Undo()
        {
            base.OnRollback();

            // Get rid of observed distance.
            m_Distance.OnRollback(this);

            // Mark created features for undo
            Rollback(m_NewLine1);
            Rollback(m_NewLine2);
            Rollback(m_NewPoint);

            // Remove the reference that the subdivided line makes to this edit, and restore it
            m_Line.CutOp(this);
            m_Line.Restore();
        }
Exemple #6
0
        /// <summary>
        /// Rollback this operation (occurs when a user undoes the last edit).
        /// </summary>
        internal override void Undo()
        {
            base.OnRollback();

            // Cut direct refs made by this operation.
            if (m_Line1 != null)
            {
                m_Line1.CutOp(this);
            }

            if (m_Line2 != null)
            {
                m_Line2.CutOp(this);
            }

            if (m_CloseTo != null)
            {
                m_CloseTo.CutOp(this);
            }

            // Undo the intersect point and any lines
            Rollback(m_Intersection);
            Rollback(m_Line1a);
            Rollback(m_Line1b);
            Rollback(m_Line2a);
            Rollback(m_Line2b);

            // If we actually did splits, re-activate the original line.
            if (m_Line1a != null || m_Line1b != null)
            {
                m_Line1a = null;
                m_Line1b = null;
                m_Line1.Restore();
            }

            if (m_Line2a != null || m_Line2b != null)
            {
                m_Line2a = null;
                m_Line2b = null;
                m_Line2.Restore();
            }
        }