mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-15 09:40:45 +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
|
begin
|
||||||
if IsMasked and (not ReadOnly) then
|
if IsMasked and (not ReadOnly) then
|
||||||
begin
|
begin
|
||||||
SetinheritedText(FTextOnEnter);
|
SetInheritedText(FTextOnEnter);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1659,9 +1659,12 @@ begin
|
|||||||
//Escape Key
|
//Escape Key
|
||||||
if (Key = VK_ESCAPE) and (Shift = []) then
|
if (Key = VK_ESCAPE) and (Shift = []) then
|
||||||
begin
|
begin
|
||||||
Reset;
|
if ((inherited Text) <> FTextOnEnter) then
|
||||||
Key := 0;
|
begin
|
||||||
Exit;
|
Reset;
|
||||||
|
Key := 0;
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
//Handle clipboard and delete/backspace keys
|
//Handle clipboard and delete/backspace keys
|
||||||
if (Key = VK_DELETE) then
|
if (Key = VK_DELETE) then
|
||||||
|
Loading…
Reference in New Issue
Block a user