Showing the changes to interface/src/Application.cpp (1 of 9 files). Show all
Unified · Split
| @@ -140,9 +140,9 @@ Application::Application(int& argc, char** argv, timeval &startup_time) : · 139 unmodified lines | ||
| 140 | 140 | _fps(120.0f), |
| 141 | 141 | _justStarted(true), |
| 142 | 142 | _voxelImporter(NULL), |
| 143 | + _sharedVoxelSystem(TREE_SCALE, DEFAULT_MAX_VOXELS_PER_SYSTEM, &_clipboard), | |
| 143 | 144 | _wantToKillLocalVoxels(false), |
| 144 | 145 | _audioScope(256, 200, true), |
| 145 | − _myAvatar(), | |
| 146 | 146 | _mirrorViewRect(QRect(MIRROR_VIEW_LEFT_PADDING, MIRROR_VIEW_TOP_PADDING, MIRROR_VIEW_WIDTH, MIRROR_VIEW_HEIGHT)), |
| 147 | 147 | _mouseX(0), |
| 148 | 148 | _mouseY(0), |
| @@ -1387,6 +1387,8 @@ void Application::exportVoxels(const VoxelDetail& sourceVoxel) { · 1238 unmodified lines | ||
| 1387 | 1387 | } |
| 1388 | 1388 | |
| 1389 | 1389 | void Application::importVoxels() { |
| 1390 | + int result = 1; | |
| 1391 | + | |
| 1390 | 1392 | if (!_voxelImporter) { |
| 1391 | 1393 | _voxelImporter = new VoxelImporter(_window); |
| 1392 | 1394 | _voxelImporter->loadSettings(_settings); |
| @@ -1394,6 +1396,7 @@ void Application::importVoxels() { · 1 unmodified line | ||
| 1394 | 1396 | |
| 1395 | 1397 | if (!_voxelImporter->exec()) { |
| 1396 | 1398 | qDebug() << "[DEBUG] Import succeeded." << endl; |
| 1399 | + result = 0; | |
| 1397 | 1400 | } else { |
| 1398 | 1401 | qDebug() << "[DEBUG] Import failed." << endl; |
| 1399 | 1402 | if (_sharedVoxelSystem.getTree() == _voxelImporter->getVoxelTree()) { |
| @@ -1404,6 +1407,8 @@ void Application::importVoxels() { · 4 unmodified lines | ||
| 1404 | 1407 | |
| 1405 | 1408 | // restore the main window's active state |
| 1406 | 1409 | _window->activateWindow(); |
| 1410 | + | |
| 1411 | + emit importDone(result); | |
| 1407 | 1412 | } |
| 1408 | 1413 | |
| 1409 | 1414 | void Application::cutVoxels(const VoxelDetail& sourceVoxel) { |
| @@ -1495,10 +1500,9 @@ void Application::init() { · 85 unmodified lines | ||
| 1495 | 1500 | |
| 1496 | 1501 | // Cleanup of the original shared tree |
| 1497 | 1502 | _sharedVoxelSystem.init(); |
| 1498 | − VoxelTree* tmpTree = _sharedVoxelSystem.getTree(); | |
| 1499 | − _sharedVoxelSystem.changeTree(&_clipboard); | |
| 1500 | − delete tmpTree; | |
| 1501 | − | |
| 1503 | + | |
| 1504 | + _voxelImporter = new VoxelImporter(_window); | |
| 1505 | + | |
| 1502 | 1506 | _environment.init(); |
| 1503 | 1507 | |
| 1504 | 1508 | _glowEffect.init(); |