History

importVoxels() JS override: specify file and location

Bennett Goble committed 12 years ago

Commit bd409f21 parent 8be42bf9 files · +215 −160Browse files

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

Unified · Split

interface/src/Application.cpp+11−10
@@ -137,7 +137,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 136 unmodified lines
137 _frameCount(0),137 _frameCount(0),
138 _fps(60.0f),138 _fps(60.0f),
139 _justStarted(true),139 _justStarted(true),
140 _voxelImporter(NULL),140 _voxelImportDialog(NULL),
141 _voxelImporter(),
141 _importSucceded(false),142 _importSucceded(false),
142 _sharedVoxelSystem(TREE_SCALE, DEFAULT_MAX_VOXELS_PER_SYSTEM, &_clipboard),143 _sharedVoxelSystem(TREE_SCALE, DEFAULT_MAX_VOXELS_PER_SYSTEM, &_clipboard),
143 _wantToKillLocalVoxels(false),144 _wantToKillLocalVoxels(false),
@@ -428,7 +429,7 @@ Application::~Application() { · 284 unmodified lines
428 delete idleTimer;429 delete idleTimer;
429 430
430 _sharedVoxelSystem.changeTree(new VoxelTree);431 _sharedVoxelSystem.changeTree(new VoxelTree);
431 delete _voxelImporter;432 delete _voxelImportDialog;
432 433
433 // let the avatar mixer know we're out434 // let the avatar mixer know we're out
434 MyAvatar::sendKillAvatar();435 MyAvatar::sendKillAvatar();
@@ -463,8 +464,8 @@ void Application::saveSettings() { · 28 unmodified lines
463 Menu::getInstance()->saveSettings();464 Menu::getInstance()->saveSettings();
464 _rearMirrorTools->saveSettings(_settings);465 _rearMirrorTools->saveSettings(_settings);
465 466
466 if (_voxelImporter) {467 if (_voxelImportDialog) {
467 _voxelImporter->saveSettings(_settings);468 _voxelImportDialog->saveSettings(_settings);
468 }469 }
469 _settings->sync();470 _settings->sync();
470 _numChangedSettings = 0;471 _numChangedSettings = 0;
@@ -1568,17 +1569,17 @@ void Application::exportVoxels(const VoxelDetail& sourceVoxel) { · 1097 unmodified lines
1568void Application::importVoxels() {1569void Application::importVoxels() {
1569 _importSucceded = false;1570 _importSucceded = false;
1570 1571
1571 if (!_voxelImporter) {1572 if (!_voxelImportDialog) {
1572 _voxelImporter = new VoxelImporter(_window);1573 _voxelImportDialog = new VoxelImportDialog(_window);
1573 _voxelImporter->loadSettings(_settings);1574 _voxelImportDialog->loadSettings(_settings);
1574 }1575 }
1575 1576
1576 if (!_voxelImporter->exec()) {1577 if (!_voxelImportDialog->exec()) {
1577 qDebug() << "Import succeeded." << endl;1578 qDebug() << "Import succeeded." << endl;
1578 _importSucceded = true;1579 _importSucceded = true;
1579 } else {1580 } else {
1580 qDebug() << "Import failed." << endl;1581 qDebug() << "Import failed." << endl;
1581 if (_sharedVoxelSystem.getTree() == _voxelImporter->getVoxelTree()) {1582 if (_sharedVoxelSystem.getTree() == _voxelImporter.getVoxelTree()) {
1582 _sharedVoxelSystem.killLocalVoxels();1583 _sharedVoxelSystem.killLocalVoxels();
1583 _sharedVoxelSystem.changeTree(&_clipboard);1584 _sharedVoxelSystem.changeTree(&_clipboard);
1584 }1585 }
@@ -1680,7 +1681,7 @@ void Application::init() { · 95 unmodified lines
1680 // Cleanup of the original shared tree1681 // Cleanup of the original shared tree
1681 _sharedVoxelSystem.init();1682 _sharedVoxelSystem.init();
1682 1683
1683 _voxelImporter = new VoxelImporter(_window);1684 _voxelImportDialog = new VoxelImportDialog(_window);
1684 1685
1685 _environment.init();1686 _environment.init();
1686 1687

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