History

More work on editVoxel.js

Clement committed 12 years ago

Commit dcaef451 parent ca0cd2d9 files · +273 −138Browse files

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

Unified · Split

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

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