mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 08:38:19 +02:00
lcl: update DBEdit.Text in SetFocus when widgetset does not support clipboard messages. Issue #29693
git-svn-id: trunk@51921 -
This commit is contained in:
parent
1a67a8c6c8
commit
2be91bc1f5
@ -195,16 +195,24 @@ begin
|
||||
end;
|
||||
|
||||
procedure TDBEdit.WMSetFocus(var Message: TLMSetFocus);
|
||||
var
|
||||
EditOnFocus: Boolean;
|
||||
begin
|
||||
// update text before inherited so DoEnter has the new text
|
||||
if not FFocusedDisplay then
|
||||
begin
|
||||
FFocusedDisplay := True;
|
||||
// some widgetsets do not notify clipboard actions properly. Put at edit state at entry
|
||||
EditOnFocus := WidgetSet.GetLCLCapability(lcReceivesLMClearCutCopyPasteReliably) = LCL_CAPABILITY_NO;
|
||||
if EditOnFocus then
|
||||
begin
|
||||
if FDataLink.Edit then
|
||||
RestoreMask(FDataLink.Field.Text);
|
||||
end
|
||||
else
|
||||
FDataLink.Reset;
|
||||
end;
|
||||
inherited WMSetFocus(Message);
|
||||
// some widgetsets do not notify clipboard actions properly. Put at edit state at entry
|
||||
if FFocusedDisplay then
|
||||
exit;
|
||||
FFocusedDisplay := true;
|
||||
if WidgetSet.GetLCLCapability(lcReceivesLMClearCutCopyPasteReliably) = LCL_CAPABILITY_YES then
|
||||
FDataLink.Reset
|
||||
else
|
||||
FDataLink.Edit;
|
||||
end;
|
||||
|
||||
procedure TDBEdit.WMKillFocus(var Message: TLMKillFocus);
|
||||
|
Loading…
Reference in New Issue
Block a user