Allow newDocument: on NSDocumentController only when there is a default

type.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27667 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rmottola 2009-01-24 13:11:25 +00:00
parent e2011f6fb3
commit e0fa17197c
2 changed files with 9 additions and 0 deletions

View file

@ -1121,6 +1121,10 @@ static BOOL _shouldClose = YES;
{
return [self hasEditedDocuments];
}
if (sel_eq([anItem action], @selector(newDocument:)))
{
return ([self defaultType] != nil);
}
return YES;
}