sdeboy 2004/05/27 00:50:58
Modified: src/java/org/apache/log4j/chainsaw LogPanel.java
Log:
Minor change to correct scroll to bottom case where last & first indexes are same
Revision Changes Path
1.75 +2 -2 logging-log4j/src/java/org/apache/log4j/chainsaw/LogPanel.java
Index: LogPanel.java
===================================================================
RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/chainsaw/LogPanel.java,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -r1.74 -r1.75
--- LogPanel.java 27 May 2004 07:22:26 -0000 1.74
+++ LogPanel.java 27 May 2004 07:50:58 -0000 1.75
@@ -713,9 +713,9 @@
to bypass the scroll-to-bottom feature when the user selects a row other
than the bottom row,
one of two conditions must be met:
1: neither the 'firstindex' nor the 'lastindex' are on the last row, or
- 2: the last index value didn't change and the 'lastindex' is on the last
row
+ 2: the last index value didn't change and the 'lastindex' is on the last
row, and the last index and first index aren't the same
*/
- bypassScrollSelection = (!(lastIndexOnLastRow || firstIndexOnLastRow)) ||
(lastIndexSame && lastIndexOnLastRow);
+ bypassScrollSelection = (!(lastIndexOnLastRow || firstIndexOnLastRow)) ||
(lastIndexSame && lastIndexOnLastRow && (evt.getFirstIndex() != evt.getLastIndex()));
previousLastIndex = evt.getLastIndex();
final ListSelectionModel lsm = (ListSelectionModel) evt.getSource();
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]