/// <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();

            // 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 #4
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();
            }
        }