mirror of
https://github.com/mitmproxy/mitmproxy.git
synced 2024-11-23 21:30:04 +00:00
update evenlog when verbosity changes
This commit is contained in:
parent
f36dbc62a8
commit
ab3da19eaa
@ -21,6 +21,7 @@ class EventLog(urwid.ListBox, layoutwidget.LayoutWidget):
|
|||||||
|
|
||||||
master.events.sig_add.connect(self.add_event)
|
master.events.sig_add.connect(self.add_event)
|
||||||
master.events.sig_refresh.connect(self.refresh_events)
|
master.events.sig_refresh.connect(self.refresh_events)
|
||||||
|
self.master.options.subscribe(self.refresh_events, ["verbosity"])
|
||||||
self.refresh_events()
|
self.refresh_events()
|
||||||
|
|
||||||
super().__init__(self.walker)
|
super().__init__(self.walker)
|
||||||
@ -54,7 +55,7 @@ class EventLog(urwid.ListBox, layoutwidget.LayoutWidget):
|
|||||||
if self.master.options.console_focus_follow:
|
if self.master.options.console_focus_follow:
|
||||||
self.walker.set_focus(len(self.walker) - 1)
|
self.walker.set_focus(len(self.walker) - 1)
|
||||||
|
|
||||||
def refresh_events(self, event_store=None):
|
def refresh_events(self, *_):
|
||||||
self.walker.clear()
|
self.walker.clear()
|
||||||
for event in self.master.events.data:
|
for event in self.master.events.data:
|
||||||
self.add_event(None, event)
|
self.add_event(None, event)
|
||||||
|
Loading…
Reference in New Issue
Block a user