mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 13:00:37 +00:00
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:
parent
30eca5ede6
commit
f6fb00fad1
6 changed files with 184 additions and 40 deletions
|
@ -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];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue