mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 17:59:59 +02:00
LCL: take CharCase into account in TCustomEdit.RealSetText. Prevents unneccessary OnChanges and fixes infinite OnChange loop. Issue #0037313.
git-svn-id: trunk@63542 -
This commit is contained in:
parent
1f0ff07dc2
commit
b3ba26f89d
@ -560,13 +560,30 @@ begin
|
||||
end;
|
||||
|
||||
procedure TCustomEdit.RealSetText(const AValue: TCaption);
|
||||
var
|
||||
Temp: TCaption;
|
||||
begin
|
||||
Temp:=AValue;
|
||||
{
|
||||
case
|
||||
CharCase of
|
||||
ecNormal: Temp := AValue; //if Text=AValue SetText won't call RealSetText, so no need to check
|
||||
ecUpperCase: begin
|
||||
Temp := Utf8UpperCase(AValue);
|
||||
if (Temp = RealGetText) then Exit;
|
||||
end;
|
||||
ecLowerCase: begin
|
||||
Temp := Utf8LowerCase(AValue);
|
||||
if (Temp = RealGetText) then Exit;
|
||||
end;
|
||||
end;
|
||||
}
|
||||
if (FEmulatedTextHintStatus=thsShowing) and (AValue<>'') then
|
||||
HideEmulatedTextHint;
|
||||
|
||||
FTextChangedByRealSetText := True;
|
||||
Modified := False;
|
||||
inherited RealSetText(AValue);
|
||||
inherited RealSetText(Temp);
|
||||
FTextChangedByRealSetText := False;
|
||||
|
||||
if (FEmulatedTextHintStatus=thsHidden) and CanShowEmulatedTextHint then
|
||||
|
Loading…
Reference in New Issue
Block a user