psmith 2003/09/17 00:32:30
Modified: src/java/org/apache/log4j/chainsaw LogPanel.java
Log:
Fixed a bug where the popup menu's refinement option
were not in sync with the currently selected line.
Also don't bother updating if the panel is not visible
or the value is still adjusting.
Revision Changes Path
1.12 +10 -1 jakarta-log4j/src/java/org/apache/log4j/chainsaw/LogPanel.java
Index: LogPanel.java
===================================================================
RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/chainsaw/LogPanel.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- LogPanel.java 17 Sep 2003 01:31:36 -0000 1.11
+++ LogPanel.java 17 Sep 2003 07:32:30 -0000 1.12
@@ -235,8 +235,17 @@
table.getSelectionModel().addListSelectionListener(
new ListSelectionListener() {
public void valueChanged(ListSelectionEvent e) {
+ if (e.getValueIsAdjusting() || !isVisible()) {
+ return;
+ }
+
LoggingEvent event = null;
- event = tableModel.getRow(e.getFirstIndex());
+ int row = table.getSelectedRow();
+
+ if (row > -1) {
+ event = tableModel.getRow(row);
+ }
+
rebuildFocusOnMenuFromEvent(event);
}
});
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-dev-help@jakarta.apache.org
|