Ejemplo n.º 1
0
        /// <summary>
        /// Changes cell-text in accord with <c><see cref="Undo()">Undo()</see></c> or
        /// <c><see cref="Redo()">Redo()</see></c>.
        /// </summary>
        void RestoreCell()
        {
            //logfile.Log("UndoRedo.RestoreCell()");

            var cell = _it.cell.Clone() as Cell;

            int
                c = _it.cell.x,
                r = _it.cell.y;

            _grid[r, c] = cell;

            _grid.Colwidth(c, r);
            _grid.metricFrozenControls(c);

            _grid.ClearSelects(true);
            cell.selected = true;
            _grid.EnsureDisplayed(cell);

            _grid._f.EnableCelleditOperations();


            int invalid = YataGrid.INVALID_GRID
                          | YataGrid.INVALID_FROZ
                          | YataGrid.INVALID_ROWS;

            if (_grid.Propanel != null && _grid.Propanel.Visible)
            {
                invalid |= YataGrid.INVALID_PROP;
            }

            _grid.Invalidator(invalid);
        }