diff options
author | Torbjörn Andersson | 2009-01-10 23:38:30 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2009-01-10 23:38:30 +0000 |
commit | 20638a0f97438fff10cb8ac1bf90c197e032faa2 (patch) | |
tree | 3489c377a40b6bd41aeb7f9018acff631cd5861c /gui | |
parent | b4eb116f65112336250644621d778f7db0f99c12 (diff) | |
download | scummvm-rg350-20638a0f97438fff10cb8ac1bf90c197e032faa2.tar.gz scummvm-rg350-20638a0f97438fff10cb8ac1bf90c197e032faa2.tar.bz2 scummvm-rg350-20638a0f97438fff10cb8ac1bf90c197e032faa2.zip |
Moved some stuff from the EditGameDialog constructor to its open() method to
avoid uninitialised variables. (This is similar to some bugs that were fixed
earlier today.)
svn-id: r35811
Diffstat (limited to 'gui')
-rw-r--r-- | gui/launcher.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/gui/launcher.cpp b/gui/launcher.cpp index 3753f67aeb..119e3596f8 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -246,16 +246,10 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc) // GUI: Button + Label for the additional path new ButtonWidget(tab, "GameOptions_Paths.Extrapath", "Extra Path:", kCmdExtraBrowser, 0); _extraPathWidget = new StaticTextWidget(tab, "GameOptions_Paths.ExtrapathText", extraPath); - if (extraPath.empty() || !ConfMan.hasKey("extrapath", _domain)) { - _extraPathWidget->setLabel("None"); - } // GUI: Button + Label for the save path new ButtonWidget(tab, "GameOptions_Paths.Savepath", "Save Path:", kCmdSaveBrowser, 0); _savePathWidget = new StaticTextWidget(tab, "GameOptions_Paths.SavepathText", savePath); - if (savePath.empty() || !ConfMan.hasKey("savepath", _domain)) { - _savePathWidget->setLabel("Default"); - } // Activate the first tab tab->setActiveTab(0); @@ -280,6 +274,16 @@ void EditGameDialog::reflowLayout() { void EditGameDialog::open() { OptionsDialog::open(); + String extraPath(ConfMan.get("extrapath", _domain)); + if (extraPath.empty() || !ConfMan.hasKey("extrapath", _domain)) { + _extraPathWidget->setLabel("None"); + } + + String savePath(ConfMan.get("savepath", _domain)); + if (savePath.empty() || !ConfMan.hasKey("savepath", _domain)) { + _savePathWidget->setLabel("Default"); + } + int sel, i; bool e; |