From a6880c0f9987b9b4e97628234f0726e981dc63fe Mon Sep 17 00:00:00 2001 From: fredkiefer Date: Tue, 23 Mar 2010 20:27:23 +0000 Subject: [PATCH] * Source/NSTextContainer.m (-replaceLayoutManager:): Retain the text storage while replacing the layout manager. See last patch. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30025 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 5 +++++ Source/NSTextContainer.m | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index cc6320b12..2a7bdf305 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-03-23 Fred Kiefer + + * Source/NSTextContainer.m (-replaceLayoutManager:): Retain the + text storage while replacing the layout manager. See last patch. + 2010-03-23 Fred Kiefer * Source/GSXibLoader.m: Try to be a bit closer to the current NIB diff --git a/Source/NSTextContainer.m b/Source/NSTextContainer.m index 292989e8a..c19dd59fa 100644 --- a/Source/NSTextContainer.m +++ b/Source/NSTextContainer.m @@ -166,6 +166,7 @@ framework intact. GSLayoutManager *oldLayoutManager = _layoutManager; RETAIN(oldLayoutManager); + RETAIN(textStorage); [textStorage removeLayoutManager: _layoutManager]; [textStorage addLayoutManager: aLayoutManager]; @@ -186,6 +187,7 @@ framework intact. [[container textView] setTextContainer: container]; RELEASE(container); } + RELEASE(textStorage); RELEASE(oldLayoutManager); } }