mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-13 14:59:11 +02:00
MaskEdit: when user presses Escape, don't "eat" the key if there is nothing to reset.
(Delphi compatibility). Partially resolves issue #0023936. git-svn-id: trunk@40379 -
This commit is contained in:
parent
1c5712de23
commit
44caf00ceb
@ -1579,7 +1579,7 @@ procedure TCustomMaskEdit.Reset;
|
||||
begin
|
||||
if IsMasked and (not ReadOnly) then
|
||||
begin
|
||||
SetinheritedText(FTextOnEnter);
|
||||
SetInheritedText(FTextOnEnter);
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -1659,9 +1659,12 @@ begin
|
||||
//Escape Key
|
||||
if (Key = VK_ESCAPE) and (Shift = []) then
|
||||
begin
|
||||
Reset;
|
||||
Key := 0;
|
||||
Exit;
|
||||
if ((inherited Text) <> FTextOnEnter) then
|
||||
begin
|
||||
Reset;
|
||||
Key := 0;
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
//Handle clipboard and delete/backspace keys
|
||||
if (Key = VK_DELETE) then
|
||||
|
Loading…
Reference in New Issue
Block a user