GUI: 'Mass Add' button text does not revert after mass add
|Reported by:||fingolfin||Owned by:||fingolfin|
This was originally reported by joachim. This is for current SVN, on all platforms:
In the launcher, if you abort MassAdd, the button in the GUI is stuck with the "Mass Add.." text, even when Shift is not pressed anymore. The same happens if you hold shift, then open the "Options" dialog, then release shift, then close the options dialog again.
The problem of course is that we don't see the key up event in LauncherDialog::handleKeyUp, as the shift key is still pressed when we open the mass add confirm alert box (which will then see the "key up" event instead.
One simple way to fix this is to simply always revert to the "Add Game" label after the mass add code run. But that won't cover the other cases. Somewhat more generic would be to reset the text whenever we notice that we lost/gained focus. That still won't ensure that we stay in sync with the shift key status. To be able to do that, we need to keep track of the modifier state throughout multiple event loops. Hence, we likely need an OSystem::getModifierState method, or a similar thing in a hypothetical EventManager class (see my mail to scummvm-devel).
Ticket imported from: #1657322. Ticket imported from: bugs/3051.