From 2b8fa11b84645f63b9a2abbcf291a130996fa9de Mon Sep 17 00:00:00 2001 From: Alexander Ljungberg Date: Mon, 30 May 2011 00:03:12 -0400 Subject: [PATCH] Optimise level indicator archiving (don't record static background colour). --- AppKit/CPLevelIndicator.j | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/AppKit/CPLevelIndicator.j b/AppKit/CPLevelIndicator.j index 6eb42ed44..6a9812c12 100644 --- a/AppKit/CPLevelIndicator.j +++ b/AppKit/CPLevelIndicator.j @@ -370,7 +370,11 @@ var CPLevelIndicatorStyleKey = "CPLevelIndicatorStyleKey", - (void)encodeWithCoder:(CPCoder)aCoder { + // There's no reason to encode the background. + var background = [self backgroundColor]; + [self setBackgroundColor:nil]; [super encodeWithCoder:aCoder]; + [self setBackgroundColor:background]; [aCoder encodeInt:_levelIndicatorStyle forKey:CPLevelIndicatorStyleKey]; [aCoder encodeDouble:_minValue forKey:CPLevelIndicatorMinValueKey];