GUI: Indirectly changing 'GUI Language' can produce inconsistent behaviour when changing some options.
|Reported by:||macca8||Owned by:||criezy|
This bug was revealed when the 'restart' message was replaced with the 'Apply' button implementation.
Platform: Intel Mac (OS X 10.6.8)
Language (OS default): English
First detected: DB 1.10.0git681-gc32be8e (4 Nov 2016)
Tested with current Daily Build from website: 1.10.0git2760-g6e3ffd3 (13 Mch 2017)
This bug is created whenever changing a global option also indirectly changes the 'GUI Language' setting from 'default' to English.
It appears to be self healing, in that when it occurs, the bug removes itself from future changes (though there may be side effects of which I am unaware).
I guess the real issue is that it doesn't always do this gracefully.
Note: It also triggers a separate issue with rebuilding the Launcher after a GUI Language change, but that's not exclusive to this case.
What happens is that (unknown to the user) a change is made to the 'GUI Language' setting, but isn't immediately written to the Config file.
Instead it waits for the next time the user clicks 'Apply' or 'OK', then writes the change to the Config file, neglecting the change the user intended to make.
To reproduce an example of the effect of this bug, do the following:
- Start ScummVM with all Global Options set to their normal defaults.
- Check that 'GUI Language' is set to 'default'.
- Change 'Graphics Mode' to OpenGL, then click 'Apply'.
- Click 'Cancel' to return to the Launcher.
- Return to the Graphics tab… the 'Graphics Filter' option is added (this activates the bug).
- Select 'Graphics Filter', then click 'Apply'… the setting will be deselected (the language setting is added to the Config file).
- Repeat the selection, then click 'Apply' to complete the change.
- Clicking 'OK' in step 3 skips step 4, but doesn't allow you to accurately track the changes in the Config file if you wish to do so.
Before the 'Apply' button was added, this bug would trigger the 'restart' message, and be deleted (along with the invalid theme switch fixed in PR 919) upon restart… which suggests the language change is not meant to be retained.
Restarting still works as before, but the user is no longer advised to do so.
As a workaround, this bug can be avoided by simply changing the 'GUI Language' setting from 'default' to English before making any other changes.