mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 03:19:17 +02:00
MaskEdit: check if control can be focussed before focussing when validation fails in DoExit. Issue #0030482. Patch by Lutz Mändle.
git-svn-id: trunk@52837 -
This commit is contained in:
parent
5230d13340
commit
5bf9ffa801
@ -1778,7 +1778,9 @@ begin
|
|||||||
FValidationFailed := False;
|
FValidationFailed := False;
|
||||||
end ;
|
end ;
|
||||||
finally
|
finally
|
||||||
if FValidationFailed then
|
//also check if control can be focussed, otherwise risk an exception while
|
||||||
|
//handling an exception, issue #0030482
|
||||||
|
if FValidationFailed and CanSetFocus then
|
||||||
begin
|
begin
|
||||||
//debugln('TCustomMaskedit.DoExit: Validation failed');
|
//debugln('TCustomMaskedit.DoExit: Validation failed');
|
||||||
SetFocus;
|
SetFocus;
|
||||||
|
Loading…
Reference in New Issue
Block a user