From 90fe0d64f5457f30095d499c90ff4fc21aa7d077 Mon Sep 17 00:00:00 2001 From: Francisco Ryan Tolmasky I Date: Tue, 9 Jun 2009 16:45:27 -0700 Subject: [PATCH] Fix for dragged types not working on decoded views. Reviewed by me. --- AppKit/CPImageView.j | 2 +- AppKit/CPView.j | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/AppKit/CPImageView.j b/AppKit/CPImageView.j index 11b180534..c8657562f 100644 --- a/AppKit/CPImageView.j +++ b/AppKit/CPImageView.j @@ -344,7 +344,7 @@ var LEFT_SHADOW_INSET = 3.0, - (void)setEditable:(BOOL)shouldBeEditable { if (_isEditable === shouldBeEditable) - return _isEditable; + return; _isEditable = shouldBeEditable; diff --git a/AppKit/CPView.j b/AppKit/CPView.j index e9c489a50..98cfa6ad0 100644 --- a/AppKit/CPView.j +++ b/AppKit/CPView.j @@ -2230,6 +2230,10 @@ var CPViewAutoresizingMaskKey = @"CPViewAutoresizingMask", _subviews = [aCoder decodeObjectForKey:CPViewSubviewsKey] || []; _superview = [aCoder decodeObjectForKey:CPViewSuperviewKey]; + // FIXME: Should we encode/decode this? + _registeredDraggedTypes = [CPSet set]; + _registeredDraggedTypesArray = []; + _autoresizingMask = [aCoder decodeIntForKey:CPViewAutoresizingMaskKey] || CPViewNotSizable; _autoresizesSubviews = ![aCoder containsValueForKey:CPViewAutoresizesSubviewsKey] || [aCoder decodeBoolForKey:CPViewAutoresizesSubviewsKey];