lcl: apply patch for issue "DBEdit does not update the dataset" by Bart Broersma (mantis #0012938)

git-svn-id: trunk@18225 -
This commit is contained in:
paul 2009-01-09 17:21:16 +00:00
parent 530feb4ea2
commit 84b988a827

View File

@ -1054,8 +1054,8 @@ procedure TCustomMaskEdit.TextChanged;
begin begin
if not IsMasked then if not IsMasked then
begin begin
Exit;
Inherited TextChanged; Inherited TextChanged;
Exit;
end; end;
if FChangeAllowed then Inherited TextChanged; if FChangeAllowed then Inherited TextChanged;
if not FChangeAllowed then if not FChangeAllowed then
@ -1392,7 +1392,8 @@ begin
begin begin
DeleteSelected; DeleteSelected;
InsertChar(Key); InsertChar(Key);
Key:= #0; //TDBEdit needs the value of Key to decide if Datasource is in Edit state
//Key:= #0;
end; end;
end; end;
@ -1496,6 +1497,8 @@ begin
and TextIsValid might wrongly return False and TextIsValid might wrongly return False
We need the text with literals and FSpaceChar translated to #32 We need the text with literals and FSpaceChar translated to #32
} }
//Somehow TDBEdit calls ValidateEdit even no mask is set!!
if not IsMasked then Exit;
_MaskSave := FMaskSave; _MaskSave := FMaskSave;
FMaskSave := True; FMaskSave := True;
S := Text; S := Text;