diff options
author | Mattes D <github@xoft.cz> | 2015-03-28 20:47:24 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2015-03-28 20:47:24 +0100 |
commit | d3aba9ed3fa516db2e32498282bc5a54c77578ce (patch) | |
tree | 2994a843cbfed7ec7291d591b590400a31141954 /Tools/QtBiomeVisualiser/GeneratorSetup.cpp | |
parent | Fixed placing bottom half-slabs by clicking a top half-slab. (diff) | |
download | cuberite-d3aba9ed3fa516db2e32498282bc5a54c77578ce.tar cuberite-d3aba9ed3fa516db2e32498282bc5a54c77578ce.tar.gz cuberite-d3aba9ed3fa516db2e32498282bc5a54c77578ce.tar.bz2 cuberite-d3aba9ed3fa516db2e32498282bc5a54c77578ce.tar.lz cuberite-d3aba9ed3fa516db2e32498282bc5a54c77578ce.tar.xz cuberite-d3aba9ed3fa516db2e32498282bc5a54c77578ce.tar.zst cuberite-d3aba9ed3fa516db2e32498282bc5a54c77578ce.zip |
Diffstat (limited to 'Tools/QtBiomeVisualiser/GeneratorSetup.cpp')
-rw-r--r-- | Tools/QtBiomeVisualiser/GeneratorSetup.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Tools/QtBiomeVisualiser/GeneratorSetup.cpp b/Tools/QtBiomeVisualiser/GeneratorSetup.cpp index 8f97e1f37..54b7ef36e 100644 --- a/Tools/QtBiomeVisualiser/GeneratorSetup.cpp +++ b/Tools/QtBiomeVisualiser/GeneratorSetup.cpp @@ -120,15 +120,23 @@ void GeneratorSetup::editChanged(const QString & a_NewValue) void GeneratorSetup::updateFromIni() { - m_eSeed->setText(QString::number(m_IniFile->GetValueI("Seed", "Seed", 0))); + // Set the seed editbox: + int seed = m_IniFile->GetValueI("Seed", "Seed", 0); + m_eSeed->setText(QString::number(seed)); int keyID = m_IniFile->FindKey("Generator"); if (keyID <= -1) { return; } - int numItems = m_IniFile->GetNumValues(keyID); + + // Set the Generator combobox: AString generatorName = m_IniFile->GetValue("Generator", "BiomeGen"); size_t generatorNameLen = generatorName.length(); + int index = m_cbGenerator->findText(QString::fromStdString(generatorName)); + m_cbGenerator->setCurrentIndex(index); + + // Create the controls for all the generator settings in the INI file: + int numItems = m_IniFile->GetNumValues(keyID); for (int i = 0; i < numItems; i++) { AString itemName = m_IniFile->GetValueName(keyID, i); |