fpspreadsheet: Fix WorksheetGrid not being able to delete a cell block.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6323 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz 2018-04-19 20:30:43 +00:00
parent edccbda8d8
commit b6e1a4c495
2 changed files with 9 additions and 0 deletions

View File

@ -2144,6 +2144,8 @@ end;
-------------------------------------------------------------------------------}
procedure TsWorksheet.DeleteCell(ACell: PCell);
{$warning TODO: Shift cells to the right/below !!! ??? }
var
r, c: Cardinal;
begin
if ACell = nil then
exit;
@ -2159,8 +2161,13 @@ begin
exit;
end;
r := ACell^.Row;
c := ACell^.Col;
// Destroy the cell, and remove it from the tree
RemoveAndFreeCell(ACell^.Row, ACell^.Col);
ChangedCell(r, c);
end;
{@@ ----------------------------------------------------------------------------

View File

@ -4630,6 +4630,8 @@ begin
end;
VK_F2:
FEnhEditMode := true;
VK_DELETE:
Worksheet.DeleteSelection;
end;
inherited;