Revision: 5377
          http://skim-app.svn.sourceforge.net/skim-app/?rev=5377&view=rev
Author:   hofman
Date:     2009-05-12 15:14:46 +0000 (Tue, 12 May 2009)

Log Message:
-----------
more direct check for scrollview placard and reorder some code

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

Modified: trunk/NSScrollView_SKExtensions.m
===================================================================
--- trunk/NSScrollView_SKExtensions.m   2009-05-11 22:16:37 UTC (rev 5376)
+++ trunk/NSScrollView_SKExtensions.m   2009-05-12 15:14:46 UTC (rev 5377)
@@ -62,13 +62,13 @@
 
 - (void)replacement_setHasHorizontalScroller:(BOOL)flag;
 {
-    if ([[self placards] count] == 0)
+    CFDictionaryRemoveValue(scrollViewPlacardViews, self);
         original_setHasHorizontalScroller(self, _cmd, flag);
 }
 
 - (void)replacement_setAutohidesScrollers:(BOOL)flag;
 {
-    if ([[self placards] count] == 0)
+    CFDictionaryRemoveValue(scrollViewPlacardViews, self);
         original_setAutohidesScrollers(self, _cmd, flag);
 }
 
@@ -109,15 +109,12 @@
         CFDictionarySetValue(scrollViewPlacardViews, self, placardView);
     }
     
-    [placardView removeFromSuperview];
-    
-    NSArray *subviews = [[placardView subviews] retain];
     NSEnumerator *viewEnum = [newPlacards objectEnumerator];
     NSView *view;
-    [subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];
+    [placardView removeFromSuperview];
+    [[[[placardView subviews] copy] autorelease] 
makeObjectsPerformSelector:@selector(removeFromSuperview)];
     while (view = [viewEnum nextObject])
         [placardView addSubview:view];
-    [subviews release];
     
     if ([newPlacards count] != 0) {
         original_setHasHorizontalScroller(self, 
@selector(setHasHorizontalScroller:), YES);


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

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to