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
137137 _frameCount(0),
138138 _fps(60.0f),
139139 _justStarted(true),
140− _voxelImporter(NULL),
140+ _voxelImportDialog(NULL),
141+ _voxelImporter(),
141142 _importSucceded(false),
142143 _sharedVoxelSystem(TREE_SCALE, DEFAULT_MAX_VOXELS_PER_SYSTEM, &_clipboard),
143144 _wantToKillLocalVoxels(false),
@@ -428,7 +429,7 @@ Application::~Application() { · 284 unmodified lines
428429 delete idleTimer;
429430
430431 _sharedVoxelSystem.changeTree(new VoxelTree);
431− delete _voxelImporter;
432+ delete _voxelImportDialog;
432433
433434 // let the avatar mixer know we're out
434435 MyAvatar::sendKillAvatar();
@@ -463,8 +464,8 @@ void Application::saveSettings() { · 28 unmodified lines
463464 Menu::getInstance()->saveSettings();
464465 _rearMirrorTools->saveSettings(_settings);
465466
466− if (_voxelImporter) {
467− _voxelImporter->saveSettings(_settings);
467+ if (_voxelImportDialog) {
468+ _voxelImportDialog->saveSettings(_settings);
468469 }
469470 _settings->sync();
470471 _numChangedSettings = 0;
@@ -1568,17 +1569,17 @@ void Application::exportVoxels(const VoxelDetail& sourceVoxel) { · 1097 unmodified lines
15681569 void Application::importVoxels() {
15691570 _importSucceded = false;
15701571
1571− if (!_voxelImporter) {
1572− _voxelImporter = new VoxelImporter(_window);
1573− _voxelImporter->loadSettings(_settings);
1572+ if (!_voxelImportDialog) {
1573+ _voxelImportDialog = new VoxelImportDialog(_window);
1574+ _voxelImportDialog->loadSettings(_settings);
15741575 }
15751576
1576− if (!_voxelImporter->exec()) {
1577+ if (!_voxelImportDialog->exec()) {
15771578 qDebug() << "Import succeeded." << endl;
15781579 _importSucceded = true;
15791580 } else {
15801581 qDebug() << "Import failed." << endl;
1581− if (_sharedVoxelSystem.getTree() == _voxelImporter->getVoxelTree()) {
1582+ if (_sharedVoxelSystem.getTree() == _voxelImporter.getVoxelTree()) {
15821583 _sharedVoxelSystem.killLocalVoxels();
15831584 _sharedVoxelSystem.changeTree(&_clipboard);
15841585 }
@@ -1680,7 +1681,7 @@ void Application::init() { · 95 unmodified lines
16801681 // Cleanup of the original shared tree
16811682 _sharedVoxelSystem.init();
16821683
1683− _voxelImporter = new VoxelImporter(_window);
1684+ _voxelImportDialog = new VoxelImportDialog(_window);
16841685
16851686 _environment.init();
16861687

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