mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
GUI: Disable Current View Selection Button in Save/Load Chooser.
Switching between List and Grid views causes a nasty redraw flicker. This also occurs if you press the button for the current view type. This patch does not fix the underlying refresh issue, but it does disable the button for the current view type as pressing this is not useful in any case. This is a partial fix for bug Trac #10441.
This commit is contained in:
parent
88001f8310
commit
9831f6ddd2
@ -264,11 +264,17 @@ void SaveLoadChooserDialog::handleTickle() {
|
||||
|
||||
void SaveLoadChooserDialog::reflowLayout() {
|
||||
#ifndef DISABLE_SAVELOADCHOOSER_GRID
|
||||
addChooserButtons();
|
||||
|
||||
const SaveLoadChooserType currentType = getType();
|
||||
const SaveLoadChooserType requestedType = getRequestedSaveLoadDialog(*_metaEngine);
|
||||
|
||||
addChooserButtons();
|
||||
if (currentType == kSaveLoadDialogList) {
|
||||
_listButton->setEnabled(false);
|
||||
}
|
||||
if (currentType == kSaveLoadDialogGrid) {
|
||||
_gridButton->setEnabled(false);
|
||||
}
|
||||
|
||||
// Change the dialog type if there is any need for it.
|
||||
if (requestedType != currentType) {
|
||||
setResult(kSwitchSaveLoadDialog);
|
||||
|
Loading…
Reference in New Issue
Block a user