sdeboy 2003/06/08 00:41:55 Modified: src/java/org/apache/log4j/chainsaw LogUI.java Log: - Detail panel was toggling between 'nothing selected' to the last row's detail text for every batch of events received. Fixed the problem by not processing selection change events where the first and last index are the same. - One more annoying issue to correct - row is getting unselected frequently (when new events are received but scroll to bottom is disabled, when a color filter is applied). Revision Changes Path 1.88 +1 -7 jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/LogUI.java Index: LogUI.java =================================================================== RCS file: /home/cvs/jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/LogUI.java,v retrieving revision 1.87 retrieving revision 1.88 diff -u -r1.87 -r1.88 --- LogUI.java 8 Jun 2003 04:58:00 -0000 1.87 +++ LogUI.java 8 Jun 2003 07:41:55 -0000 1.88 @@ -1278,7 +1278,7 @@ table.getSelectionModel().addListSelectionListener( new ListSelectionListener() { public void valueChanged(ListSelectionEvent evt) { - if (evt.getValueIsAdjusting()) { + if ((evt.getFirstIndex() == evt.getLastIndex()) || (evt.getValueIsAdjusting())) { return; } @@ -1924,7 +1924,6 @@ private int lastRow; private final JEditorPane pane; private final EventContainer model; - private long lastUpdate = 0; public DetailPaneUpdater(JEditorPane pane, EventContainer model) { this.pane = pane; @@ -1932,17 +1931,12 @@ } public void setSelectedRow(int row) { - // if(System.currentTimeMillis()-lastUpdate<1500){ - // lastUpdate = System.currentTimeMillis(); - // return; - // } if (row == -1) { lastRow = 0; } selectedRow = row; updateDetailPane(); - lastUpdate = System.currentTimeMillis(); } private void updateDetailPane() {
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]