Revision: 3116
http://skim-app.svn.sourceforge.net/skim-app/?rev=3116&view=rev
Author: hofman
Date: 2007-11-01 02:50:44 -0700 (Thu, 01 Nov 2007)
Log Message:
-----------
Properly remove edge view when setting new subcontrols for scroll view.
Modified Paths:
--------------
trunk/NSScrollView_SKExtensions.m
Modified: trunk/NSScrollView_SKExtensions.m
===================================================================
--- trunk/NSScrollView_SKExtensions.m 2007-10-31 21:53:23 UTC (rev 3115)
+++ trunk/NSScrollView_SKExtensions.m 2007-11-01 09:50:44 UTC (rev 3116)
@@ -188,7 +188,7 @@
float height = NSHeight(horizScrollerFrame) - 1.0, totalWidth = 0.0;
BDSKEdgeView *edgeView = (BDSKEdgeView *)[[[subcontrols lastObject]
superview] superview];
- if (edgeView == nil) {
+ if ([edgeView isDescendantOf:self] == NO) {
edgeView = [[[BDSKEdgeView alloc] init] autorelease];
[edgeView setEdgeColor:[NSColor colorWithCalibratedWhite:0.75
alpha:1.0]];
[edgeView setEdges:BDSKMinXEdgeMask | BDSKMaxYEdgeMask];
@@ -222,14 +222,14 @@
CFDictionarySetValue(scrollViewSubcontrols, self, subcontrols);
}
- if ([subcontrols count])
+ if ([subcontrols count]) {
+ [subcontrols
makeObjectsPerformSelector:@selector(removeFromSuperview)];
edgeView = (BDSKEdgeView *)[[[subcontrols lastObject] superview]
superview];
-
- [subcontrols makeObjectsPerformSelector:@selector(removeFromSuperview)];
+ [edgeView removeFromSuperview];
+ }
[subcontrols setArray:newSubControls];
if ([subcontrols count] == 0 && subcontrols) {
- [edgeView removeFromSuperview];
CFDictionaryRemoveValue(scrollViewSubcontrols, self);
subcontrols = nil;
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit