Showing the changes to interface/src/Application.cpp (1 of 2 files). Show all
Unified · Split
| @@ -1244,6 +1244,12 @@ void Application::setRenderWarnings(bool renderWarnings) { · 1243 unmodified lines | ||
| 1244 | 1244 | _voxels.setRenderPipelineWarnings(renderWarnings); |
| 1245 | 1245 | } |
| 1246 | 1246 | |
| 1247 | +void Application::setRenderVoxels(bool voxelRender) { | |
| 1248 | + if (voxelRender) { | |
| 1249 | + doKillLocalVoxels(); | |
| 1250 | + } | |
| 1251 | +} | |
| 1252 | + | |
| 1247 | 1253 | void Application::doKillLocalVoxels() { |
| 1248 | 1254 | _wantToKillLocalVoxels = true; |
| 1249 | 1255 | } |
| @@ -1554,9 +1560,8 @@ void Application::initMenu() { · 304 unmodified lines | ||
| 1554 | 1560 | optionsMenu->addAction("Go Home", this, SLOT(goHome())); |
| 1555 | 1561 | |
| 1556 | 1562 | QMenu* renderMenu = menuBar->addMenu("Render"); |
| 1557 | − (_renderVoxels = renderMenu->addAction("Voxels"))->setCheckable(true); | |
| 1563 | + (_renderVoxels = renderMenu->addAction("Voxels", this, SLOT(setRenderVoxels(bool)), Qt::SHIFT | Qt::Key_V))->setCheckable(true); | |
| 1558 | 1564 | _renderVoxels->setChecked(true); |
| 1559 | − _renderVoxels->setShortcut(Qt::SHIFT | Qt::Key_V); | |
| 1560 | 1565 | (_renderVoxelTextures = renderMenu->addAction("Voxel Textures"))->setCheckable(true); |
| 1561 | 1566 | (_renderStarsOn = renderMenu->addAction("Stars"))->setCheckable(true); |
| 1562 | 1567 | _renderStarsOn->setChecked(true); |