Fixed with the new string size optimisation: the cache value was returned by reference and something in the CPButton path for image and text buttons changed it causing text to become misaligned. A defensive copy avoids this problem.

This commit is contained in:
Alexander Ljungberg
2010-10-21 17:36:09 +02:00
committed by Klaas Pieter Annema
parent afcce49455
commit 367efe590e
+1 -1
View File
@@ -60,7 +60,7 @@ var CPStringSizeWithFontInWidthCache = {};
CPStringSizeWithFontInWidthCache[cacheKey] = size;
}
return size;
return CGSizeMakeCopy(size);
}