Closed jim618 closed 9 years ago
The problem is in MainView
line 254. We need additional logic to indicate that we're changing language rather than assuming that because we're in Trezor mode we need to simply show the select wallet screen.
I've refactored MainView
so that it can detect if a language change was the cause of the refresh. This will allow the unitialised Trezor detection to work as before, but a language change will override it.
Ready for review and close.
This is working with the code as is, but I'll not close it until #586 is complete as it'll need retesting when that code is ready.
I have retested this. It works in normal usage but fails if you go 'clickety clack, pressity press'. i.e hammer the keyboard.
In the log I see (might not be the actual problem):
[2015-06-03 13:04:53,476] DEBUG [AWT-EventQueue-1] o.m.h.u.v.c.p.LightBoxPanel - Wizard light box panel removed from application frame
[2015-06-03 13:04:53,479] DEBUG [AWT-EventQueue-1] o.m.h.u.v.w.AbstractWizard - Hide requested for WELCOME_SELECT_LANGUAGE with exitCancel true
[2015-06-03 13:04:53,479] ERROR [AWT-EventQueue-1] o.m.h.u.v.w.AbstractWizard - '[]' is not a valid panel name. Check the panel has been registered in the view map. Registered panels are
{}
[2015-06-03 13:04:53,480] INFO [safe-fixed-core-events-6] o.m.h.c.e.CoreEvents - Firing 'shutdown' event: HARD
Also fixed an NPE I was seeing at shutdown.
It might be worth time boxing this issue as it's only occurring with Trezor plugged in on cold start and user going clickety-clack on keyboard.
Agreed. Let's defer this into Release 0.2 given it's a corner case and that in normal use the primary fix is in place (the user is taken back to the language screen rather than the select wallet).
Just tried this with keyboard hammering and it gave the correct behaviour (sits on the language selection screen until Next is clicked). Transitioned rapidly through several languages without incident.
Ready for review and close.
Retested and the cold start routine works fine. Closing
Cold start with Trezor plugged in. Accept licence agreement Choose a language e.g. German. WITHOUT pressing Next the screen 'auto increments' to the next screen