mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
Retain teh text view not the layout manager during container replacement.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29960 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a61995b438
commit
a798a9bcc1
2 changed files with 8 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2010-03-15 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSTextView.m (-replaceTextContainer:): Retain self not
|
||||
the layout manager during container replacement.
|
||||
|
||||
2010-03-15 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSView.m (-description): Add some useful output to the
|
||||
|
|
|
@ -1145,14 +1145,15 @@ to this method from the text container or layout manager.
|
|||
|
||||
- (void) replaceTextContainer: (NSTextContainer *)newContainer
|
||||
{
|
||||
NSLayoutManager *lm = RETAIN(_layoutManager);
|
||||
NSLayoutManager *lm = _layoutManager;
|
||||
unsigned int index = [[lm textContainers] indexOfObject: _textContainer];
|
||||
|
||||
RETAIN(self);
|
||||
[_textContainer setTextView: nil];
|
||||
[lm removeTextContainerAtIndex: index];
|
||||
[lm insertTextContainer: newContainer atIndex: index];
|
||||
[newContainer setTextView: self];
|
||||
RELEASE(lm);
|
||||
RELEASE(self);
|
||||
}
|
||||
|
||||
- (NSTextContainer *) textContainer
|
||||
|
|
Loading…
Reference in a new issue