1
0

sweep/import key: show error in Qt GUI to user as tooltip

This commit is contained in:
SomberNight
2019-04-19 00:15:45 +02:00
parent 1110f13c62
commit a1d98d4331
7 changed files with 42 additions and 19 deletions

View File

@@ -198,8 +198,14 @@ class KeysLayout(QVBoxLayout):
return self.text_e.text()
def on_edit(self):
b = self.is_valid(self.get_text())
self.parent.next_button.setEnabled(b)
valid = False
try:
valid = self.is_valid(self.get_text())
except Exception as e:
self.parent.next_button.setToolTip(f'{_("Error")}: {str(e)}')
else:
self.parent.next_button.setToolTip('')
self.parent.next_button.setEnabled(valid)
class SeedDialog(WindowModalDialog):