summaryrefslogtreecommitdiffstats
path: root/Tools/QtBiomeVisualiser/MainWindow.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-11-02 17:01:51 +0100
committerMattes D <github@xoft.cz>2014-11-02 17:01:51 +0100
commit325e94709e03a2f49f672a9eff2dcfea13fd2487 (patch)
tree9108305debb8f328c5ecd53f7b14b7d33397f59e /Tools/QtBiomeVisualiser/MainWindow.cpp
parentFixed it yet again. (diff)
parentGrown biomes: fixed Linux build. (diff)
downloadcuberite-325e94709e03a2f49f672a9eff2dcfea13fd2487.tar
cuberite-325e94709e03a2f49f672a9eff2dcfea13fd2487.tar.gz
cuberite-325e94709e03a2f49f672a9eff2dcfea13fd2487.tar.bz2
cuberite-325e94709e03a2f49f672a9eff2dcfea13fd2487.tar.lz
cuberite-325e94709e03a2f49f672a9eff2dcfea13fd2487.tar.xz
cuberite-325e94709e03a2f49f672a9eff2dcfea13fd2487.tar.zst
cuberite-325e94709e03a2f49f672a9eff2dcfea13fd2487.zip
Diffstat (limited to 'Tools/QtBiomeVisualiser/MainWindow.cpp')
-rw-r--r--Tools/QtBiomeVisualiser/MainWindow.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/Tools/QtBiomeVisualiser/MainWindow.cpp b/Tools/QtBiomeVisualiser/MainWindow.cpp
index e6e951b60..c6ea8656e 100644
--- a/Tools/QtBiomeVisualiser/MainWindow.cpp
+++ b/Tools/QtBiomeVisualiser/MainWindow.cpp
@@ -32,7 +32,8 @@ const double MainWindow::m_ViewZooms[] =
MainWindow::MainWindow(QWidget * parent) :
QMainWindow(parent),
m_GeneratorSetup(nullptr),
- m_LineSeparator(nullptr)
+ m_LineSeparator(nullptr),
+ m_CurrentZoomLevel(2)
{
initMinecraftPath();
@@ -41,6 +42,7 @@ MainWindow::MainWindow(QWidget * parent) :
connect(m_BiomeView, SIGNAL(decreaseZoom()), this, SLOT(decreaseZoom()));
connect(m_BiomeView, SIGNAL(wheelUp()), this, SLOT(increaseZoom()));
connect(m_BiomeView, SIGNAL(wheelDown()), this, SLOT(decreaseZoom()));
+ m_BiomeView->setZoomLevel(m_ViewZooms[m_CurrentZoomLevel]);
m_StatusBar = new QStatusBar();
this->setStatusBar(m_StatusBar);
@@ -286,15 +288,11 @@ void MainWindow::createActions()
{
m_actViewZoom[i] = new QAction(tr("&Zoom %1%").arg(std::floor(m_ViewZooms[i] * 100)), this);
m_actViewZoom[i]->setCheckable(true);
- if ((int)(m_ViewZooms[i] * 16) == 16)
- {
- m_actViewZoom[i]->setChecked(true);
- m_CurrentZoomLevel = i;
- }
m_actViewZoom[i]->setData(QVariant(i));
zoomGroup->addAction(m_actViewZoom[i]);
connect(m_actViewZoom[i], SIGNAL(triggered()), this, SLOT(setViewZoom()));
}
+ m_actViewZoom[m_CurrentZoomLevel]->setChecked(true);
}