/// <summary>
        /// Undo a deformation and push onto another stack.
        /// </summary>
        /// <param name="undoInfo">Undo info.</param>
        private void UndoDeformation(UndoInfo undoInfo, Stack <UndoInfo> pushTo)
        {
            // Get terrain editor reference
            TerrainEditor terrainEditor = undoInfo.TerrainDeformInfo.TerrainEditor;

            // Get current terrain deformation
            TerrainDeformUndoInfo?liveData = terrainEditor.GetHeightMapUndo(
                undoInfo.TerrainDeformInfo.TerrainComponent,
                undoInfo.TerrainDeformInfo.Position.X,
                undoInfo.TerrainDeformInfo.Position.Y,
                undoInfo.TerrainDeformInfo.Dimension);

            // Perform undo operation
            terrainEditor.RestoreHeightMapUndo(undoInfo.TerrainDeformInfo);

            // Push last value on redo stack if valid
            if (liveData != null)
            {
                // Push onto stack
                undoInfo.TerrainDeformInfo = liveData.Value;
                pushTo.Push(undoInfo);
            }
        }