From: <ho...@us...> - 2006-08-29 13:09:52
|
Revision: 7601 Author: hofman Date: 2006-08-29 06:09:48 -0700 (Tue, 29 Aug 2006) ViewCVS: http://svn.sourceforge.net/bibdesk/?rev=7601&view=rev Log Message: ----------- Use flags from superclass to find out if the editor window is open without loading the nib. Modified Paths: -------------- trunk/bibdesk/BDSKErrorEditor.m Modified: trunk/bibdesk/BDSKErrorEditor.m =================================================================== --- trunk/bibdesk/BDSKErrorEditor.m 2006-08-29 13:00:34 UTC (rev 7600) +++ trunk/bibdesk/BDSKErrorEditor.m 2006-08-29 13:09:48 UTC (rev 7601) @@ -127,8 +127,6 @@ [[self window] setRepresentedFilename:fileName]; [[self window] setTitle:[NSString stringWithFormat:@"%@: %@", prefix, [self displayName]]]; - isEditing = YES; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleSelectionDidChangeNotification:) name:NSTextViewDidChangeSelectionNotification @@ -148,7 +146,6 @@ } - (void)windowWillClose:(NSNotification *)notification{ - isEditing = NO; if (document == nil) [errorController removeEditor:self]; } @@ -207,7 +204,8 @@ - (BOOL)isEditing; { - return isEditing; + // check isWindowLoaded first, so we don't unnecessarily load the nib + return [self isWindowLoaded] && [[self window] isVisible]; } - (BOOL)isPasteDrag; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |