diff options
author | madmaxoft <github@xoft.cz> | 2014-09-20 18:41:21 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-09-20 18:41:21 +0200 |
commit | 66ef05c765a7e66ec3d77cd1a1eaff4f03b28688 (patch) | |
tree | 649c0af43fd98a0afff66c95770a1cbb1a3890b6 /Tools/QtBiomeVisualiser/MainWindow.cpp | |
parent | Fixed typos in items.ini. (diff) | |
download | cuberite-66ef05c765a7e66ec3d77cd1a1eaff4f03b28688.tar cuberite-66ef05c765a7e66ec3d77cd1a1eaff4f03b28688.tar.gz cuberite-66ef05c765a7e66ec3d77cd1a1eaff4f03b28688.tar.bz2 cuberite-66ef05c765a7e66ec3d77cd1a1eaff4f03b28688.tar.lz cuberite-66ef05c765a7e66ec3d77cd1a1eaff4f03b28688.tar.xz cuberite-66ef05c765a7e66ec3d77cd1a1eaff4f03b28688.tar.zst cuberite-66ef05c765a7e66ec3d77cd1a1eaff4f03b28688.zip |
Diffstat (limited to 'Tools/QtBiomeVisualiser/MainWindow.cpp')
-rw-r--r-- | Tools/QtBiomeVisualiser/MainWindow.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Tools/QtBiomeVisualiser/MainWindow.cpp b/Tools/QtBiomeVisualiser/MainWindow.cpp index 65d0ccf5e..b6db806f9 100644 --- a/Tools/QtBiomeVisualiser/MainWindow.cpp +++ b/Tools/QtBiomeVisualiser/MainWindow.cpp @@ -39,6 +39,10 @@ MainWindow::~MainWindow() void MainWindow::generate() { QString worldIni = QFileDialog::getOpenFileName(this, tr("Open world.ini"), QString(), tr("world.ini (world.ini)")); + if (worldIni.isEmpty()) + { + return; + } m_BiomeView->setChunkSource(std::shared_ptr<BioGenSource>(new BioGenSource(worldIni))); m_BiomeView->redraw(); } @@ -49,7 +53,13 @@ void MainWindow::generate() void MainWindow::open() { - // TODO + QString regionFolder = QFileDialog::getExistingDirectory(this, tr("Select the region folder"), QString()); + if (regionFolder.isEmpty()) + { + return; + } + m_BiomeView->setChunkSource(std::shared_ptr<AnvilSource>(new AnvilSource(regionFolder))); + m_BiomeView->redraw(); } |