improve console ux for duplication/creation

This commit is contained in:
Maximilian Hils 2016-07-21 18:32:25 -07:00
parent 0911f4908b
commit 2ce7166a45
2 changed files with 5 additions and 2 deletions

View File

@ -193,7 +193,8 @@ class ConnectionItem(urwid.WidgetWrap):
signals.flowlist_change.send(self)
elif key == "D":
f = self.master.duplicate_flow(self.flow)
self.master.view_flow(f)
self.master.state.set_focus_flow(f)
signals.flowlist_change.send(self)
elif key == "m":
if self.state.flow_marked(self.flow):
self.state.set_flow_marked(self.flow, False)
@ -356,7 +357,8 @@ class FlowListBox(urwid.ListBox):
return
scheme, host, port, path = parts
f = self.master.create_request(method, scheme, host, port, path)
self.master.view_flow(f)
self.master.state.set_focus_flow(f)
signals.flowlist_change.send(self)
def keypress(self, size, key):
key = common.shortcuts(key)

View File

@ -567,6 +567,7 @@ class FlowView(tabs.Tabs):
self.state.delete_flow(f)
elif key == "D":
f = self.master.duplicate_flow(self.flow)
signals.pop_view_state.send(self)
self.master.view_flow(f)
signals.status_message.send(message="Duplicated.")
elif key == "p":