# HG changeset patch # User Goffi # Date 1563570275 -7200 # Node ID 0b1c17c24bba743f76885fc5fae9f90fbda20bf9 # Parent 7b8d40b1745156cd99333e40875ad8748f19405f core: fixed handling of button callback in popups: Button use themselve as callback, and this was causing troubles in the removePopUp method. This patch work around this by considering a Button widget in the same way as None (we never use Button directly in popups). fix 183 diff -r 7b8d40b17451 -r 0b1c17c24bba sat_frontends/primitivus/primitivus --- a/sat_frontends/primitivus/primitivus Fri Jul 19 23:01:57 2019 +0200 +++ b/sat_frontends/primitivus/primitivus Fri Jul 19 23:04:35 2019 +0200 @@ -595,7 +595,9 @@ @param widget(None, urwid.Widget): if not None remove this popup from front or queue """ # TODO: refactor popup management in a cleaner way - if widget is not None: + # buttons' callback use themselve as first argument, and we never use + # a Button directly in a popup, so we consider urwid.Button as None + if widget is not None and not isinstance(widget, urwid.Button): if isinstance(self.loop.widget, urwid.Overlay): current_popup = self.loop.widget.top_w if not current_popup == widget: