History

kill local voxels when voxel rendering is turned off

Stephen Birarda committed 13 years ago

Commit 38d80411 parent 01b7f382 files · +8 −2Browse files

Showing the changes to interface/src/Application.cpp (1 of 2 files). Show all

Unified · Split

interface/src/Application.cpp+7−2
@@ -1244,6 +1244,12 @@ void Application::setRenderWarnings(bool renderWarnings) { · 1243 unmodified lines
12441244 _voxels.setRenderPipelineWarnings(renderWarnings);
12451245 }
12461246
1247+void Application::setRenderVoxels(bool voxelRender) {
1248+ if (voxelRender) {
1249+ doKillLocalVoxels();
1250+ }
1251+}
1252+
12471253 void Application::doKillLocalVoxels() {
12481254 _wantToKillLocalVoxels = true;
12491255 }
@@ -1554,9 +1560,8 @@ void Application::initMenu() { · 304 unmodified lines
15541560 optionsMenu->addAction("Go Home", this, SLOT(goHome()));
15551561
15561562 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);
15581564 _renderVoxels->setChecked(true);
1559− _renderVoxels->setShortcut(Qt::SHIFT | Qt::Key_V);
15601565 (_renderVoxelTextures = renderMenu->addAction("Voxel Textures"))->setCheckable(true);
15611566 (_renderStarsOn = renderMenu->addAction("Stars"))->setCheckable(true);
15621567 _renderStarsOn->setChecked(true);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t