Also hide existing prompts when showing a new one
Otherwise when a prompt is interrupted, we'd still see the older one.
This commit is contained in:
parent
59b4ccc620
commit
3a79faac16
@ -280,6 +280,12 @@ class PromptContainer(QWidget):
|
||||
Args:
|
||||
question: A Question object or None.
|
||||
"""
|
||||
item = self._layout.takeAt(0)
|
||||
if item is not None:
|
||||
widget = item.widget()
|
||||
widget.hide()
|
||||
widget.deleteLater()
|
||||
|
||||
if question is None:
|
||||
self._prompt = None
|
||||
self.hide()
|
||||
|
Loading…
Reference in New Issue
Block a user