From 07301de359bddc01984019ece0b3b36383d52efe Mon Sep 17 00:00:00 2001 From: bart <9132501-flyingsheep@users.noreply.gitlab.com> Date: Fri, 19 Jun 2015 16:49:10 +0000 Subject: [PATCH] MaskEdit: Fix loading text. Issue #0028328. git-svn-id: trunk@49368 - --- lcl/maskedit.pp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lcl/maskedit.pp b/lcl/maskedit.pp index e5e4a65c0b..9442c58a3d 100644 --- a/lcl/maskedit.pp +++ b/lcl/maskedit.pp @@ -1062,6 +1062,12 @@ end; procedure TCustomMaskEdit.RealSetText(const AValue: TCaption); begin + //Setting Text while loading has unwanted side-effects + if (csLoading in ComponentState) {and (not FSettingInitialText)} then + begin + FInitialText := AValue; + Exit; + end; if not IsMasked then inherited RealSetText(AValue) else @@ -1080,12 +1086,6 @@ procedure TCustomMaskEdit.SetTextApplyMask(Value: TCaption); var S: TCaption; Begin - //Setting Text while loading has unwanted side-effects - if (csLoading in ComponentState) {and (not FSettingInitialText)} then - begin - FInitialText := Value; - Exit; - end; if IsMasked then begin try