Fixed the bug that when clicking on a source file for the first time, the editor

did not display the file's content.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@12517 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Philippe C.D. Robert 2002-02-12 21:44:28 +00:00
parent 5480873552
commit 7a51615f9d

View file

@ -409,8 +409,6 @@
{
if ((self = [super init]))
{
editorIsActive = NO;
buildOptions = [[NSMutableDictionary alloc] init];
[self _initUI];
@ -449,8 +447,9 @@
RELEASE(projectDict);
RELEASE(projectManager);
RELEASE(projectBuilder);
RELEASE(projectDebugger);
if( projectBuilder) RELEASE(projectBuilder);
if( projectDebugger) RELEASE(projectDebugger);
if( projectEditor) RELEASE(projectEditor);
RELEASE(browserController);
RELEASE(projectWindow);
@ -648,8 +647,16 @@
// Show the file in the internal editor!
e = [editorController editorForFile:p];
[e showInProjectEditor:projectEditor];
if( e == nil )
{
NSLog(@"No editor for file '%@'...",p);
return;
}
[self showEditorView:self];
[e showInProjectEditor:projectEditor];
[projectWindow makeFirstResponder:[projectEditor editorView]];
}