[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [arm/release] fix: graph panel can overlap after reconnect



commit 4793494447312e0ef1bbb33c2d82948362b129b9
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Tue Jul 12 09:40:48 2011 -0700

    fix: graph panel can overlap after reconnect
    
    If having accounting stats changes from one tor instance to the next then the
    graph panel's size can change, causing overlap with the log panel for a few
    seconds.
---
 src/cli/graphing/bandwidthStats.py |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/src/cli/graphing/bandwidthStats.py b/src/cli/graphing/bandwidthStats.py
index 642790d..f1891f9 100644
--- a/src/cli/graphing/bandwidthStats.py
+++ b/src/cli/graphing/bandwidthStats.py
@@ -6,6 +6,8 @@ stats if they're set.
 import time
 import curses
 
+import cli.controller
+
 from cli.graphing import graphPanel
 from util import log, sysTools, torTools, uiTools
 
@@ -87,7 +89,13 @@ class BandwidthStats(graphPanel.GraphStats):
     self.new_desc_event(None) # updates title params
     
     if eventType in (torTools.State.INIT, torTools.State.RESET) and self._config["features.graph.bw.accounting.show"]:
-      self.isAccounting = conn.getInfo('accounting/enabled') == '1'
+      isAccountingEnabled = conn.getInfo('accounting/enabled') == '1'
+      
+      if isAccountingEnabled != self.isAccounting:
+        self.isAccounting = isAccountingEnabled
+        
+        # redraws the whole screen since our height changed
+        cli.controller.getController().requestRedraw(True)
     
     # redraws to reflect changes (this especially noticeable when we have
     # accounting and shut down since it then gives notice of the shutdown)



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits