[Swift-commit] r3205 - trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Thu Jan 21 15:38:32 CST 2010


Author: hategan
Date: 2010-01-21 15:38:32 -0600 (Thu, 21 Jan 2010)
New Revision: 3205

Modified:
   trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Table.java
Log:
fixed older bug with table scrolling

Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Table.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Table.java	2010-01-21 21:37:33 UTC (rev 3204)
+++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Table.java	2010-01-21 21:38:32 UTC (rev 3205)
@@ -159,6 +159,12 @@
 					((TableColumn) c).setSelectedRow(selectedRow);
 				}
 			}
+			if (selectedRow < firstRow) {
+			    firstRow = Math.min(selectedRow - height + 4, 0);
+			}
+			if (selectedRow > firstRow + height - 4) {
+			    firstRow = selectedRow;
+			}
 			redraw();
 		}
 	}




More information about the Swift-commit mailing list