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

[tor-commits] [nyx/master] Always redraw header when updating



commit 2b67c9f4d97b8d232ec3b09f0dde9794cc5c18df
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Sat Apr 16 13:28:31 2016 -0700

    Always redraw header when updating
    
    When we update our stats we always want to redraw. Kinda obvious, and little
    reason not to.
    
    In practice we were *never* calling forced redraws in this method because the
    previous_height check was always true (since we fetched the 'previous' at the
    same time as the 'current').
---
 nyx/panel/header.py | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/nyx/panel/header.py b/nyx/panel/header.py
index 4e4f922..84b4b38 100644
--- a/nyx/panel/header.py
+++ b/nyx/panel/header.py
@@ -239,7 +239,6 @@ class HeaderPanel(nyx.panel.Panel, threading.Thread):
       log.notice('Tor control port closed')
 
   def _update(self):
-    previous_height = self.get_height()
     self._vals = Sampling.create(self._vals)
 
     if self._vals.fd_used and self._vals.fd_limit != -1:
@@ -261,14 +260,7 @@ class HeaderPanel(nyx.panel.Panel, threading.Thread):
         self._reported_inactive = False
         log.notice('Relay resumed')
 
-    if previous_height != self.get_height():
-      # We're toggling between being a relay and client, causing the height
-      # of this panel to change. Redraw all content so we don't get
-      # overlapping content.
-
-      nyx.controller.get_controller().redraw()
-    else:
-      self.redraw(True)  # just need to redraw ourselves
+    self.redraw(True)
 
 
 class Sampling(object):



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