From 2028efabc31939f4f5747ddb18b01cbe5ca421c0 Mon Sep 17 00:00:00 2001 From: Randall Luecke Date: Thu, 6 Jan 2011 15:08:35 -0600 Subject: [PATCH] Fix for scrollRowToVisible changing the X value instead of just the Y. Closes #1082 --- AppKit/CPTableView.j | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/AppKit/CPTableView.j b/AppKit/CPTableView.j index dff8e5c53..faaaca366 100644 --- a/AppKit/CPTableView.j +++ b/AppKit/CPTableView.j @@ -2089,7 +2089,13 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5; */ - (void)scrollRowToVisible:(int)rowIndex { - [self scrollRectToVisible:[self rectOfRow:rowIndex]]; + var visible = [self visibleRect], + rowRect = [self rectOfRow:rowIndex]; + + visible.origin.y = rowRect.origin.y; + visible.size.height = rowRect.size.height; + + [self scrollRectToVisible:visible]; } /*!