From ce499f925a3d16b1e21c610b78cc20b774d6e8b3 Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Tue, 4 Jun 2013 09:02:34 -0700 Subject: [PATCH] add cut voxels --- interface/src/Application.cpp | 6 ++++++ interface/src/Application.h | 1 + 2 files changed, 7 insertions(+) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 26d7f92533..6ef5d0d5bc 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -1413,6 +1413,11 @@ void Application::importVoxels() { _window->activateWindow(); } +void Application::cutVoxels() { + copyVoxels(); + deleteVoxelUnderCursor(); +} + void Application::copyVoxels() { VoxelNode* selectedNode = _voxels.getVoxelAt(_mouseVoxel.x, _mouseVoxel.y, _mouseVoxel.z, _mouseVoxel.s); if (selectedNode) { @@ -1545,6 +1550,7 @@ void Application::initMenu() { voxelMenu->addAction("Export Voxels", this, SLOT(exportVoxels()), Qt::CTRL | Qt::Key_E); voxelMenu->addAction("Import Voxels", this, SLOT(importVoxels()), Qt::CTRL | Qt::Key_I); + voxelMenu->addAction("Cut Voxels", this, SLOT(cutVoxels()), Qt::CTRL | Qt::Key_X); voxelMenu->addAction("Copy Voxels", this, SLOT(copyVoxels()), Qt::CTRL | Qt::Key_C); voxelMenu->addAction("Paste Voxels", this, SLOT(pasteVoxels()), Qt::CTRL | Qt::Key_V); diff --git a/interface/src/Application.h b/interface/src/Application.h index edcc1d6b82..017759277c 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -156,6 +156,7 @@ private slots: void chooseVoxelPaintColor(); void exportVoxels(); void importVoxels(); + void cutVoxels(); void copyVoxels(); void pasteVoxels();