ecere/FormDesigner: Fix for default 'transparent = true' to not show up when updating...
authorJerome St-Louis <jerome@ecere.com>
Tue, 23 Aug 2011 15:56:52 +0000 (11:56 -0400)
committerJerome St-Louis <jerome@ecere.com>
Tue, 23 Aug 2011 15:56:52 +0000 (11:56 -0400)
ecere/src/com/dataTypes.ec
ecere/src/gfx/BitmapResource.ec

index 9b30de4..4b2cb51 100644 (file)
@@ -470,7 +470,7 @@ static char * OnGetString(Class _class, void * data, char * tempString, void * f
             {
                Property prop = (Property) member;
 
-               if(!prop.conversion && prop.Get && prop.Set)
+               if(!prop.conversion && prop.Get && prop.Set && (!prop.IsSet || prop.IsSet(data)))
                {
                   if(memberType.type != structClass && (memberType.type != normalClass || !strcmp(memberType.dataTypeString, "char *")) && memberType.type != bitClass && data)
                   {
@@ -492,7 +492,7 @@ static char * OnGetString(Class _class, void * data, char * tempString, void * f
                      else
                      {
                         value.i = prop.Get(data);
-                        if(value.i)
+                        if(value.i || prop.IsSet)
                         {
                            bool needClass = true;
                            char * result = (char *)memberType._vTbl[__ecereVMethodID_class_OnGetString](memberType, 
index c75c54b..17d8fe8 100644 (file)
@@ -165,7 +165,7 @@ public:
       } 
       get { return this ? mono : false; }
    };
-   property bool transparent { set { transparent = value; } get { return this ? transparent : false; } };
+   property bool transparent { set { transparent = value; } get { return this ? transparent : false; } isset { return (this && !transparent) ? true : false; } };
    property bool alphaBlend { set { alphaBlend = value; } get { return this ? alphaBlend : false; } };
    property bool keepData { set { keepData = value; } get { return this ? keepData : false; } };
    property Bitmap bitmap { get { return this ? bitmap : null; } set { bitmap = value; if(bitmap) incref bitmap; } };