From 3a79faac164020899f411dc509c4400f695ae0ff Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 3 Nov 2016 23:03:42 +0100 Subject: [PATCH] Also hide existing prompts when showing a new one Otherwise when a prompt is interrupted, we'd still see the older one. --- qutebrowser/mainwindow/prompt.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qutebrowser/mainwindow/prompt.py b/qutebrowser/mainwindow/prompt.py index 2bcfef61f..aa4fbcfd2 100644 --- a/qutebrowser/mainwindow/prompt.py +++ b/qutebrowser/mainwindow/prompt.py @@ -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()