mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-29 19:08:44 +00:00
Do id-based comparison rather than value-based comparison to establish flow focus.
This fixes a bug where focus would jump unpredictably between identical flows.
This commit is contained in:
parent
894d3cc62d
commit
0e62dd479b
@ -1028,7 +1028,8 @@ class ConsoleMaster(flow.FlowMaster):
|
|||||||
self.ui.clear()
|
self.ui.clear()
|
||||||
if self.currentflow:
|
if self.currentflow:
|
||||||
try:
|
try:
|
||||||
idx = self.state.view.index(self.currentflow)
|
ids = [id(i) for i in self.state.view]
|
||||||
|
idx = ids.index(id(self.currentflow))
|
||||||
self.conn_list_view.set_focus(idx)
|
self.conn_list_view.set_focus(idx)
|
||||||
except (IndexError, ValueError):
|
except (IndexError, ValueError):
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user