diff --git a/ChangeLog b/ChangeLog index 82666c811..23172a24c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-04-01 Nicola Pero + + * Source/NSSplitView.m ([-adjustSubviews]): Removed unused + variable and a few unnecessary method calls. + 2008-03-31 Xavier Glattard * Source/NSOpenGLView.m: Use _lockFocusInContext:withRect instead of diff --git a/Source/NSSplitView.m b/Source/NSSplitView.m index 706141e65..4cc821291 100644 --- a/Source/NSSplitView.m +++ b/Source/NSSplitView.m @@ -633,7 +633,6 @@ static NSNotificationCenter *nc = nil; NSSize newSize; NSPoint newPoint; unsigned i; - NSRect r; float oldTotal; float newTotal; float scale; @@ -659,7 +658,6 @@ static NSNotificationCenter *nc = nil; { float newHeight; - r = [views[i] frame]; newHeight = NSHeight(frames[i]) * scale; if (i == count - 1) { @@ -682,7 +680,8 @@ static NSNotificationCenter *nc = nil; oldTotal = 0.0; for (i = 0; i < count; i++) { - oldTotal += NSWidth([views[i] frame]); + frames[i] = [views[i] frame]; + oldTotal += NSWidth(frames[i]); } scale = newTotal/oldTotal; running = 0.0; @@ -690,8 +689,7 @@ static NSNotificationCenter *nc = nil; { float newWidth; - r = [views[i] frame]; - newWidth = NSWidth(r) * scale; + newWidth = NSWidth(frames[i]) * scale; if (i == count - 1) { newWidth = floor(newWidth);