mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-21 03:31:40 +00:00
GUI: Fix hidden files visibility getting out of sync in the files browser
- The checkbox state was not initialized when opening the dialog. - The visibility state was initialized from ConfMan too early resuling in the value being incorrect when multiple file browsers are used.
This commit is contained in:
parent
8d6a6fb982
commit
dac70196f0
@ -49,7 +49,7 @@ BrowserDialog::BrowserDialog(const char *title, bool dirBrowser)
|
||||
_isDirBrowser = dirBrowser;
|
||||
_fileList = NULL;
|
||||
_currentPath = NULL;
|
||||
_showHidden = ConfMan.getBool("gui_browser_show_hidden", Common::ConfigManager::kApplicationDomain);
|
||||
_showHidden = false;
|
||||
|
||||
// Headline - TODO: should be customizable during creation time
|
||||
new StaticTextWidget(this, "Browser.Headline", title);
|
||||
@ -85,8 +85,10 @@ void BrowserDialog::open() {
|
||||
if (!_node.isDirectory())
|
||||
_node = Common::FSNode(".");
|
||||
|
||||
// Alway refresh file list
|
||||
updateListing();
|
||||
_showHidden = ConfMan.getBool("gui_browser_show_hidden", Common::ConfigManager::kApplicationDomain);
|
||||
_showHiddenWidget->setState(_showHidden);
|
||||
|
||||
// At this point the file list has already been refreshed by the kHiddenCmd handler
|
||||
}
|
||||
|
||||
void BrowserDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user