lcl: Fix Paste / Clear / Cut in TDBMemo. Similar to TDBEdit / TDBComboBox

git-svn-id: trunk@32496 -
This commit is contained in:
blikblum 2011-09-24 13:04:45 +00:00
parent 017292bb65
commit 355083fd19

View File

@ -187,7 +187,17 @@ begin
LM_CLEAR,
LM_CUT,
LM_PASTE:
FDatalink.Edit;
if FDataLink.CanModify then
begin
//LCL changes the Text before LM_PASTE is called and not after like Delphi. Issue 20330
//When Edit is called the Text property is reset to the previous value
//Add a workaround while bug is not fixed
FDataLink.OnDataChange := nil;
FDatalink.Edit;
FDataLink.Modified;
FDataLink.OnDataChange := @DataChange;
inherited WndProc(AMessage);
end;
end;
inherited WndProc(AMessage);
end;