[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [arm/release] fix: Flushing torrc display cache when invisible
commit 80003ef45f1e4280f47fbbb0b39f2c74f75907de
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date: Wed May 11 21:10:08 2011 -0700
fix: Flushing torrc display cache when invisible
Previously overwriting our torrc by saving it would flush this cache, but at
its new location in the config panel this isn't a great option (I'm trying to
avoid cross-panel communication). A better solution is to just flush this
cache whenever we're turned invisible.
---
src/cli/torrcPanel.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/cli/torrcPanel.py b/src/cli/torrcPanel.py
index 75ddd1b..af6f4d6 100644
--- a/src/cli/torrcPanel.py
+++ b/src/cli/torrcPanel.py
@@ -77,6 +77,12 @@ class TorrcPanel(panel.Panel):
self.valsLock.release()
return isKeystrokeConsumed
+ def setVisible(self, isVisible):
+ if not isVisible:
+ self._lastContentHeightArgs = None # redraws when next displayed
+
+ panel.Panel.setVisible(self, isVisible)
+
def getHelp(self):
options = []
options.append(("up arrow", "scroll up a line", None))
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits