From 15d74b4e19147736eead6e868c2bc4e63f47da0e Mon Sep 17 00:00:00 2001 From: Johann Bauer Date: Wed, 12 Jul 2017 21:34:14 +0200 Subject: [PATCH] Fix "Back" button in installwizard Since this seems to be the first page of the wizard, there is nothing to go back to. Furthermore, clicking "Back" actually takes you to the next step. This changes the button to "Close" and closes the wizard. --- gui/qt/installwizard.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gui/qt/installwizard.py b/gui/qt/installwizard.py index a9107508..de430041 100644 --- a/gui/qt/installwizard.py +++ b/gui/qt/installwizard.py @@ -109,6 +109,7 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard): self.title = QLabel() self.main_widget = QWidget() self.back_button = QPushButton(_("Back"), self) + self.back_button.setText(_('Back') if self.can_go_back() else _('Cancel')) self.next_button = QPushButton(_("Next"), self) self.next_button.setDefault(True) self.logo = QLabel() @@ -209,8 +210,8 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard): while True: if self.storage.file_exists() and not self.storage.is_encrypted(): break - if not self.loop.exec_(): - return + if self.loop.exec_() != 2: # 2 = next + self.close() if not self.storage.file_exists(): break if self.storage.file_exists() and self.storage.is_encrypted():