mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-16 11:40:42 +00:00
Fixed: Method ’_themeAttributes’ never saved anything in the cache
This commit is contained in:
1 parent
9946987f69
commit
5e1f1675b8
1 file changed
+8
-3
@@ -186,9 +186,14 @@ var CPViewThemeClassKey = @"CPViewThemeClassKey",
|
||||
|
||||
var theClass = [self class],
|
||||
CPObjectClass = [CPObject class],
|
||||
attributes = [],
|
||||
attributes = CachedThemeAttributes[class_getName(theClass)],
|
||||
nullValue = [CPNull null];
|
||||
|
||||
if (attributes)
|
||||
return attributes;
|
||||
else
|
||||
attributes = [];
|
||||
|
||||
for (; theClass && theClass !== CPObjectClass; theClass = [theClass superclass])
|
||||
{
|
||||
var cachedAttributes = CachedThemeAttributes[class_getName(theClass)];
|
||||
@@ -196,8 +201,6 @@ var CPViewThemeClassKey = @"CPViewThemeClassKey",
|
||||
if (cachedAttributes)
|
||||
{
|
||||
attributes = attributes.length ? attributes.concat(cachedAttributes) : attributes;
|
||||
CachedThemeAttributes[[self className]] = attributes;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -219,6 +222,8 @@ var CPViewThemeClassKey = @"CPViewThemeClassKey",
|
||||
}
|
||||
}
|
||||
|
||||
CachedThemeAttributes[[self className]] = attributes;
|
||||
|
||||
return attributes;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user