mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 13:59:31 +02:00
parent
2e1f289436
commit
2ca5b0d2f8
@ -1598,7 +1598,7 @@ begin
|
||||
+FTIObject.ClassName+':'+FTIPropertyName);
|
||||
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 ((FEditor<>nil) or OldEditorExisted) and Assigned(OnEditorChanged) then
|
||||
OnEditorChanged(Self);
|
||||
|
@ -2763,15 +2763,27 @@ end;
|
||||
function TIntegerPropertyEditor.OrdValueToVisualValue(OrdValue: longint
|
||||
): string;
|
||||
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
|
||||
otSByte : Result:= IntToStr(ShortInt(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));
|
||||
otULong : Result:= IntToStr(Cardinal(OrdValue));
|
||||
else Result := IntToStr(OrdValue);
|
||||
end;
|
||||
//debugln('TIntegerPropertyEditor.OrdValueToVisualValue ',Result);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TIntegerPropertyEditor.SetValue(const NewValue: AnsiString);
|
||||
|
Loading…
Reference in New Issue
Block a user