summaryrefslogtreecommitdiffstats
path: root/Tools/QtBiomeVisualiser/MainWindow.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-09-22 21:51:59 +0200
committermadmaxoft <github@xoft.cz>2014-09-22 21:52:38 +0200
commit83588fb0aad5c8597df783792c946c27327f1a40 (patch)
tree986aac86163c6ccc380886480c8c277f17d68742 /Tools/QtBiomeVisualiser/MainWindow.cpp
parentQtBiomeVisualiser: generator source is read from generator setup ini. (diff)
downloadcuberite-83588fb0aad5c8597df783792c946c27327f1a40.tar
cuberite-83588fb0aad5c8597df783792c946c27327f1a40.tar.gz
cuberite-83588fb0aad5c8597df783792c946c27327f1a40.tar.bz2
cuberite-83588fb0aad5c8597df783792c946c27327f1a40.tar.lz
cuberite-83588fb0aad5c8597df783792c946c27327f1a40.tar.xz
cuberite-83588fb0aad5c8597df783792c946c27327f1a40.tar.zst
cuberite-83588fb0aad5c8597df783792c946c27327f1a40.zip
Diffstat (limited to 'Tools/QtBiomeVisualiser/MainWindow.cpp')
-rw-r--r--Tools/QtBiomeVisualiser/MainWindow.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/Tools/QtBiomeVisualiser/MainWindow.cpp b/Tools/QtBiomeVisualiser/MainWindow.cpp
index c55d85082..a2cfa7794 100644
--- a/Tools/QtBiomeVisualiser/MainWindow.cpp
+++ b/Tools/QtBiomeVisualiser/MainWindow.cpp
@@ -27,7 +27,7 @@ MainWindow::MainWindow(QWidget * parent) :
m_BiomeView = new BiomeView();
m_MainLayout = new QHBoxLayout();
- m_MainLayout->addWidget(m_BiomeView);
+ m_MainLayout->addWidget(m_BiomeView, 1);
m_MainLayout->setMenuBar(menuBar());
m_MainLayout->setMargin(0);
QWidget * central = new QWidget();
@@ -57,7 +57,8 @@ void MainWindow::newGenerator()
openGeneratorSetup("");
// Set the chunk source:
- m_BiomeView->setChunkSource(std::shared_ptr<BioGenSource>(new BioGenSource(m_GeneratorSetup->getIniFile())));
+ cIniFilePtr iniFile = m_GeneratorSetup->getIniFile();
+ m_BiomeView->setChunkSource(std::shared_ptr<BioGenSource>(new BioGenSource(iniFile)));
m_BiomeView->redraw();
}
@@ -260,7 +261,6 @@ QString MainWindow::getWorldName(const AString & a_Path)
return QString();
}
AString name = nbt.GetName(1);
- OutputDebugStringA(name.c_str());
int levelNameTag = nbt.FindTagByPath(nbt.GetRoot(), "Data\\LevelName");
if ((levelNameTag <= 0) || (nbt.GetType(levelNameTag) != TAG_String))
{
@@ -286,6 +286,9 @@ void MainWindow::openGeneratorSetup(const AString & a_IniFileName)
m_LineSeparator->setStyleSheet(QString("background-color: #c0c0c0;"));
m_MainLayout->addWidget(m_LineSeparator);
m_MainLayout->addWidget(m_GeneratorSetup);
+
+ // Connect the signals from the setup pane:
+ connect(m_GeneratorSetup, SIGNAL(generatorUpdated()), m_BiomeView, SLOT(reload()));
}