LCL, don't paste to or cut from grid if it's not editable, issue #12163

git-svn-id: trunk@16625 -
This commit is contained in:
jesus 2008-09-17 14:30:27 +00:00
parent ca8df86d4b
commit ed57405eeb

View File

@ -8135,14 +8135,15 @@ end;
procedure TCustomStringGrid.DoCutToClipboard;
begin
doCopyToClipboard;
//if not GridReadOnly then
Clean(Selection, []);
if goEditing in Options then begin
doCopyToClipboard;
Clean(Selection, []);
end;
end;
procedure TCustomStringGrid.DoPasteFromClipboard;
begin
if Clipboard.HasFormat(CF_TEXT) then begin
if (goEditing in Options) and Clipboard.HasFormat(CF_TEXT) then begin
SelectionSetText(Clipboard.AsText);
end;
end;