Revision: 5553
          http://skim-app.svn.sourceforge.net/skim-app/?rev=5553&view=rev
Author:   hofman
Date:     2009-08-14 12:18:29 +0000 (Fri, 14 Aug 2009)

Log Message:
-----------
only force removing editor when setting document to nil

Modified Paths:
--------------
    trunk/SKNoteWindowController.m

Modified: trunk/SKNoteWindowController.m
===================================================================
--- trunk/SKNoteWindowController.m      2009-08-14 10:19:47 UTC (rev 5552)
+++ trunk/SKNoteWindowController.m      2009-08-14 12:18:29 UTC (rev 5553)
@@ -214,11 +214,13 @@
 
 - (void)setDocument:(NSDocument *)document {
     // in case the document is reset before windowWillClose: is called, I 
think this can happen on Tiger
-    if ([self document] && document == nil && [self commitEditing] == NO)
-        [self discardEditing];
-    if (isEditing) {
-        [[self document] objectDidEndEditing:self];
-        isEditing = NO;
+    if ([self document] && document == nil) {
+        if ([self commitEditing] == NO)
+            [self discardEditing];
+        if (isEditing) {
+            [[self document] objectDidEndEditing:self];
+            isEditing = NO;
+        }
     }
     [super setDocument:document];
 }


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to