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:
bart 2013-02-24 00:09:38 +00:00
parent 1c5712de23
commit 44caf00ceb

View File

@ -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