Prevent initWithCoder: from calling initWithFrame: in NSView. According to the documentation, initWithFrame: should not be called when the view is unarchiving itself. Similar changes were needed in other classes since they depended on this call to initialize themselves, so some init code was added to initWithCoder:.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23143 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
gcasa 2006-07-07 01:39:16 +00:00
parent 30eca5ede6
commit f6fb00fad1
6 changed files with 184 additions and 40 deletions

View file

@ -799,6 +799,9 @@ static inline NSRect integralRect (NSRect rect, NSView *view)
if ([[self subviews] count] > 0)
{
id document = [aDecoder decodeObjectForKey: @"NSDocView"];
NSRect rect = [document frame];
rect.origin = NSZeroPoint;
[document setFrame: rect];
[self removeSubview: document];
[self setDocumentView: document];
}