Applied patch sent in by O. Kornilov to avoid exception when clicking

on file name in browser


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@14263 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Philippe C.D. Robert 2002-08-10 12:10:55 +00:00
parent 8841a26519
commit cfb5894d70

View file

@ -54,8 +54,6 @@ NSString *PCEditorDidResignKeyNotification=@"PCEditorDidResignKeyNotification";
storage = [[NSTextStorage alloc] init];
lm = [[NSLayoutManager alloc] init];
[storage addLayoutManager:lm];
RELEASE(lm);
rect.origin.x = 0;
rect.origin.y = 0;
@ -66,6 +64,9 @@ NSString *PCEditorDidResignKeyNotification=@"PCEditorDidResignKeyNotification";
[lm addTextContainer:tc];
RELEASE(tc);
[storage addLayoutManager:lm];
RELEASE(lm);
iView = [[PCEditorView alloc] initWithFrame:rect
textContainer:tc];
[iView setEditor:self];
@ -83,13 +84,14 @@ NSString *PCEditorDidResignKeyNotification=@"PCEditorDidResignKeyNotification";
[[iView textContainer] setWidthTracksTextView:YES];
lm = [[NSLayoutManager alloc] init];
[storage addLayoutManager:lm];
RELEASE(lm);
tc = [[NSTextContainer alloc] initWithContainerSize:rect.size];
[lm addTextContainer:tc];
RELEASE(tc);
[storage addLayoutManager:lm];
RELEASE(lm);
eView = [[PCEditorView alloc] initWithFrame:rect
textContainer:tc];
[eView setEditor:self];