logging-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sde...@apache.org
Subject svn commit: r928607 - /logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java
Date Mon, 29 Mar 2010 06:28:18 GMT
Author: sdeboy
Date: Mon Mar 29 06:28:17 2010
New Revision: 928607

URL: http://svn.apache.org/viewvc?rev=928607&view=rev
Log:
If the log was cleared, clear thumbnail state & ensure we repaint

Modified:
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java?rev=928607&r1=928606&r2=928607&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java (original)
+++ logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java Mon Mar 29
06:28:17 2010
@@ -3110,9 +3110,7 @@ public class LogPanel extends DockablePa
                     if (lastRow == Integer.MAX_VALUE) {
                         lastRow = table.getRowCount() -1; //zero-indexed rows
                     }
-                    if (firstRow < 0 || lastRow < 0) {
-                        return;
-                    }
+
                     List displayedEvents = tableModel.getFilteredEvents();
                     if (e.getType() == TableModelEvent.INSERT) {
 //                        System.out.println("insert - current warnings: " + warnings.size()
+ ", errors: " + errors.size() + ", first row: " + firstRow + ", last row: " + lastRow);
@@ -3180,7 +3178,12 @@ public class LogPanel extends DockablePa
                                 errors.add(new EventWrapper(i, event));
                             }
                         }
-//                        System.out.println("update - new warnings: " + warningRows.size()
+ ", errors: " + errorRows.size());
+                        //clear everything if we got an event w/-1
+                        if (firstRow < 0 || lastRow < 0) {
+                            errors.clear();
+                            warnings.clear();
+                        }
+//                        System.out.println("update - new warnings: " + warnings.size()
+ ", errors: " + errors.size());
                     }
                     repaint();
                 }



Mime
View raw message