Fix restoring of cmd widget after an error.

We accidentally restored the prompt widget instead of the command widget when
an immediate error message interrupted command mode.

Fixes #487.
This commit is contained in:
Florian Bruhin 2015-01-27 21:18:24 +01:00
parent bc380fca61
commit d90814aabe

View File

@ -279,7 +279,7 @@ class StatusBar(QWidget):
if self._previous_widget == PreviousWidget.prompt:
self._stack.setCurrentWidget(self.prompt)
elif self._previous_widget == PreviousWidget.command:
self._stack.setCurrentWidget(self.command)
self._stack.setCurrentWidget(self.cmd)
elif self._previous_widget == PreviousWidget.none:
self.maybe_hide()
else:
@ -295,7 +295,7 @@ class StatusBar(QWidget):
def _show_cmd_widget(self):
"""Show command widget instead of temporary text."""
self._set_severity(Severity.normal)
self._previous_widget = PreviousWidget.prompt
self._previous_widget = PreviousWidget.command
if self._text_pop_timer.isActive():
self._timer_was_active = True
self._text_pop_timer.stop()