Fixed TextUI peer settings save bug

This commit is contained in:
Mark Qvist 2021-05-16 15:51:11 +02:00
parent 5b52f9c8ed
commit 5b187b5d20

View File

@ -263,23 +263,24 @@ class LocalPeer(urwid.WidgetWrap):
def save_query(sender): def save_query(sender):
def dismiss_dialog(sender): def dismiss_dialog(sender):
self.dialog_open = False self.dialog_open = False
self.parent.left_pile.contents[2] = (LocalPeer(self.app, self.parent), options) self.parent.left_pile.contents[3] = (LocalPeer(self.app, self.parent), options)
self.app.set_display_name(e_name.get_edit_text()) self.app.set_display_name(e_name.get_edit_text())
dialog = DialogLineBox( dialog = DialogLineBox(
urwid.Pile([ urwid.Pile([
urwid.Text("\nSaved", align="center"), urwid.Text("\n\n\nSaved\n\n", align="center"),
urwid.Button("OK", on_press=dismiss_dialog) urwid.Button("OK", on_press=dismiss_dialog)
]), title="i" ]), title="i"
) )
dialog.delegate = self dialog.delegate = self
bottom = self bottom = self
overlay = urwid.Overlay(dialog, bottom, align="center", width=("relative", 100), valign="middle", height="pack", left=4, right=4) #overlay = urwid.Overlay(dialog, bottom, align="center", width=("relative", 100), valign="middle", height="pack", left=4, right=4)
options = self.parent.left_pile.options() overlay = dialog
options = self.parent.left_pile.options(height_type="pack", height_amount=None)
self.dialog_open = True self.dialog_open = True
self.parent.left_pile.contents[2] = (overlay, options) self.parent.left_pile.contents[3] = (overlay, options)
def announce_query(sender): def announce_query(sender):
def dismiss_dialog(sender): def dismiss_dialog(sender):