Example #1
0
        protected void RemoveChild(Tool child)
        {
            if (child == null || !m_children.Contains(child))
            {
                return;
            }

            child.PerformRemoveFromParent();
        }
Example #2
0
        /// <summary>
        /// Remove current, top level, active tool.
        /// </summary>
        public static void RemoveActiveTool()
        {
            if (m_active != null)
            {
                Tool tool = m_active;

                // PerformRemoveFromParent will check if the tool is the current active.
                // If the tool wants to remove itself and is our m_activeToolData then
                // we'll receive a call back to this method from PerformRemoveFromParent.
                m_active = null;

                tool.PerformRemoveFromParent();
            }
        }