mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 20:29:12 +02:00
parent
2e1f289436
commit
2ca5b0d2f8
@ -1598,7 +1598,7 @@ begin
|
|||||||
+FTIObject.ClassName+':'+FTIPropertyName);
|
+FTIObject.ClassName+':'+FTIPropertyName);
|
||||||
end;}
|
end;}
|
||||||
|
|
||||||
//debugln('TCustomPropertyLink.CreateEditor C ',FTIObject.ClassName+':'+FTIPropertyName,' ',dbgs(FCollectValues));
|
//debugln('TCustomPropertyLink.CreateEditor C ',FTIObject.ClassName+':'+FTIPropertyName,' ',dbgs(FCollectValues),' ',dbgsName(FEditor));
|
||||||
if CollectValues then FetchValues;
|
if CollectValues then FetchValues;
|
||||||
if ((FEditor<>nil) or OldEditorExisted) and Assigned(OnEditorChanged) then
|
if ((FEditor<>nil) or OldEditorExisted) and Assigned(OnEditorChanged) then
|
||||||
OnEditorChanged(Self);
|
OnEditorChanged(Self);
|
||||||
|
@ -2763,15 +2763,27 @@ end;
|
|||||||
function TIntegerPropertyEditor.OrdValueToVisualValue(OrdValue: longint
|
function TIntegerPropertyEditor.OrdValueToVisualValue(OrdValue: longint
|
||||||
): string;
|
): string;
|
||||||
begin
|
begin
|
||||||
with GetTypeData(GetPropType)^ do
|
with GetTypeData(GetPropType)^ do begin
|
||||||
|
{debugln('TIntegerPropertyEditor.OrdValueToVisualValue ',GetName,' ',dbgs(ord(OrdType)),' ',dbgs(OrdValue));
|
||||||
|
case OrdType of
|
||||||
|
otSByte : debugln('TIntegerPropertyEditor.OrdValueToVisualValue otSByte ',dbgs(ShortInt(OrdValue)));
|
||||||
|
otUByte : debugln('TIntegerPropertyEditor.OrdValueToVisualValue otUByte ',dbgs(Byte(OrdValue)));
|
||||||
|
otSWord : debugln('TIntegerPropertyEditor.OrdValueToVisualValue otSWord ',dbgs(SmallInt(OrdValue)));
|
||||||
|
otUWord : debugln('TIntegerPropertyEditor.OrdValueToVisualValue otUWord ',dbgs(Word(OrdValue)));
|
||||||
|
otULong : debugln('TIntegerPropertyEditor.OrdValueToVisualValue otULong ',dbgs(Cardinal(OrdValue)));
|
||||||
|
else debugln('TIntegerPropertyEditor.OrdValueToVisualValue ??? ',dbgs(OrdValue));
|
||||||
|
end;}
|
||||||
|
|
||||||
case OrdType of
|
case OrdType of
|
||||||
otSByte : Result:= IntToStr(ShortInt(OrdValue));
|
otSByte : Result:= IntToStr(ShortInt(OrdValue));
|
||||||
otUByte : Result:= IntToStr(Byte(OrdValue));
|
otUByte : Result:= IntToStr(Byte(OrdValue));
|
||||||
otSWord : Result:= IntToStr(SmallInt(OrdValue));
|
otSWord : Result:= IntToStr(Integer(SmallInt(OrdValue)));// double conversion needed due to compiler bug 3534
|
||||||
otUWord : Result:= IntToStr(Word(OrdValue));
|
otUWord : Result:= IntToStr(Word(OrdValue));
|
||||||
otULong : Result:= IntToStr(Cardinal(OrdValue));
|
otULong : Result:= IntToStr(Cardinal(OrdValue));
|
||||||
else Result := IntToStr(OrdValue);
|
else Result := IntToStr(OrdValue);
|
||||||
end;
|
end;
|
||||||
|
//debugln('TIntegerPropertyEditor.OrdValueToVisualValue ',Result);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIntegerPropertyEditor.SetValue(const NewValue: AnsiString);
|
procedure TIntegerPropertyEditor.SetValue(const NewValue: AnsiString);
|
||||||
|
Loading…
Reference in New Issue
Block a user