* Correct logic for showing correct initial value editor

git-svn-id: trunk@57529 -
This commit is contained in:
michael 2018-03-19 08:18:44 +00:00
parent e092279c61
commit fb0dc6ae2b

View File

@ -250,7 +250,9 @@ end;
function TReportVariablesForm.GetType: TResultType;
begin
if (CBType.ItemIndex in [ord(Low(TResultType))..ord(High(TResultType))]) then
Result:=TResultType(CBType.ItemIndex);
Result:=TResultType(CBType.ItemIndex)
else
Result:=rtString;
end;
function TReportVariablesForm.GetCurrentIsExpression: Boolean;
@ -339,8 +341,12 @@ Var
T : TResultType;
begin
// First hide all
For T in TResultType do
FValueControls[T].Visible:=(CBType.Itemindex=Ord(T));
FValueControls[T].Visible:=False;
// Show correct one.
// Need to do it like this, because float is used for different types...
FValueControls[GetType].Visible:=True;
end;
procedure TReportVariablesForm.SaveCurrentVariable;