Explorar o código

* Fixed default value for floats (mantis #9183)

git-svn-id: trunk@11687 -
michael %!s(int64=17) %!d(string=hai) anos
pai
achega
0ed810b6b0
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      rtl/objpas/classes/writer.inc

+ 2 - 2
rtl/objpas/classes/writer.inc

@@ -808,8 +808,8 @@ begin
         if HasAncestor then
           DefFloatValue := GetFloatProp(Ancestor, PropInfo)
         else
-          DefFloatValue := 0;
-        if FloatValue <> DefFloatValue then
+          DefFloatValue := PPropInfo(PropInfo)^.Default;
+        if (FloatValue<>DefFloatValue) or (DefValue=longint($80000000)) then
         begin
           Driver.BeginProperty(FPropPath + PPropInfo(PropInfo)^.Name);
           WriteFloat(FloatValue);