Showing the changes to interface/src/Application.cpp (1 of 12 files). Show all
Unified · Split
| @@ -1199,13 +1199,13 @@ void Application::importVoxelsToClipboard() { · 1198 unmodified lines | ||
| 1199 | 1199 | QByteArray fileNameAscii = fileNameString.toLocal8Bit(); |
| 1200 | 1200 | const char* fileName = fileNameAscii.data(); |
| 1201 | 1201 | |
| 1202 | − _clipboardTree.eraseAllVoxels(); | |
| 1202 | + _clipboard.killLocalVoxels(); | |
| 1203 | 1203 | if (fileNameString.endsWith(".png", Qt::CaseInsensitive)) { |
| 1204 | − _clipboardTree.readFromSquareARGB32Pixels(fileName); | |
| 1204 | + _clipboard.readFromSquareARGB32Pixels(fileName); | |
| 1205 | 1205 | } else if (fileNameString.endsWith(".svo", Qt::CaseInsensitive)) { |
| 1206 | − _clipboardTree.readFromSVOFile(fileName); | |
| 1206 | + _clipboard.readFromSVOFile(fileName); | |
| 1207 | 1207 | } else if (fileNameString.endsWith(".schematic", Qt::CaseInsensitive)) { |
| 1208 | − _clipboardTree.readFromSchematicFile(fileName); | |
| 1208 | + _clipboard.readFromSchematicFile(fileName); | |
| 1209 | 1209 | } |
| 1210 | 1210 | |
| 1211 | 1211 | // restore the main window's active state |
| @@ -1213,6 +1213,16 @@ void Application::importVoxelsToClipboard() { · 1 unmodified line | ||
| 1213 | 1213 | } |
| 1214 | 1214 | |
| 1215 | 1215 | void Application::importVoxels() { |
| 1216 | + if (_voxelImporter.exec()) { | |
| 1217 | + qDebug("[DEBUG] Import succedded.\n"); | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + } else { | |
| 1221 | + qDebug("[DEBUG] Import failed.\n"); | |
| 1222 | + } | |
| 1223 | + | |
| 1224 | + return; | |
| 1225 | + | |
| 1216 | 1226 | QString desktopLocation = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation); |
| 1217 | 1227 | |
| 1218 | 1228 | QStringList fileNameStringList = QFileDialog::getOpenFileNames(_glWidget, tr("Import Voxels"), desktopLocation, |
| @@ -1369,10 +1379,10 @@ void Application::copyVoxels() { · 150 unmodified lines | ||
| 1369 | 1379 | VoxelNode* selectedNode = _voxels.getVoxelAt(_mouseVoxel.x, _mouseVoxel.y, _mouseVoxel.z, _mouseVoxel.s); |
| 1370 | 1380 | if (selectedNode) { |
| 1371 | 1381 | // clear the clipboard first... |
| 1372 | − _clipboardTree.eraseAllVoxels(); | |
| 1382 | + _clipboard.killLocalVoxels(); | |
| 1373 | 1383 | |
| 1374 | 1384 | // then copy onto it |
| 1375 | − _voxels.copySubTreeIntoNewTree(selectedNode, &_clipboardTree, true); | |
| 1385 | + //_voxels.copySubTreeIntoNewTree(selectedNode, _clipboard, true); | |
| 1376 | 1386 | } |
| 1377 | 1387 | } |
| 1378 | 1388 | |
| @@ -1393,7 +1403,7 @@ void Application::pasteVoxels() { · 14 unmodified lines | ||
| 1393 | 1403 | args.newBaseOctCode = calculatedOctCode = pointToVoxel(_mouseVoxel.x, _mouseVoxel.y, _mouseVoxel.z, _mouseVoxel.s); |
| 1394 | 1404 | } |
| 1395 | 1405 | |
| 1396 | − _clipboardTree.recurseTreeWithOperation(sendVoxelsOperation, &args); | |
| 1406 | + //_clipboard.recurseTreeWithOperation(sendVoxelsOperation, &args); | |
| 1397 | 1407 | _voxelEditSender.flushQueue(); |
| 1398 | 1408 | |
| 1399 | 1409 | if (calculatedOctCode) { |