repairs to VoxelImporter to remove warning, closes #1758
Showing the changes to interface/src/Application.cpp (1 of 4 files). Show all
Unified · Split
| @@ -117,11 +117,10 @@ Application::Application(int& argc, char** argv, timeval &startup_time) : · 116 unmodified lines | ||
| 117 | 117 | _frameCount(0), |
| 118 | 118 | _fps(120.0f), |
| 119 | 119 | _justStarted(true), |
| 120 | − _voxelImporter(_window), | |
| 120 | + _voxelImporter(NULL), | |
| 121 | 121 | _wantToKillLocalVoxels(false), |
| 122 | 122 | _audioScope(256, 200, true), |
| 123 | − _avatarManager(), | |
| 124 | − _myAvatar(NULL), | |
| 123 | + _myAvatar(), | |
| 125 | 124 | _profile(QString()), |
| 126 | 125 | _mirrorViewRect(QRect(MIRROR_VIEW_LEFT_PADDING, MIRROR_VIEW_TOP_PADDING, MIRROR_VIEW_WIDTH, MIRROR_VIEW_HEIGHT)), |
| 127 | 126 | _mouseX(0), |
| @@ -1673,7 +1672,12 @@ void Application::exportVoxels() { · 1545 unmodified lines | ||
| 1673 | 1672 | } |
| 1674 | 1673 | |
| 1675 | 1674 | void Application::importVoxels() { |
| 1676 | − if (_voxelImporter.exec()) { | |
| 1675 | + if (!_voxelImporter) { | |
| 1676 | + _voxelImporter = new VoxelImporter(_window); | |
| 1677 | + _voxelImporter->init(_settings); | |
| 1678 | + } | |
| 1679 | + | |
| 1680 | + if (_voxelImporter->exec()) { | |
| 1677 | 1681 | qDebug("[DEBUG] Import succeeded."); |
| 1678 | 1682 | } else { |
| 1679 | 1683 | qDebug("[DEBUG] Import failed."); |
| @@ -1813,8 +1817,6 @@ void Application::init() { · 133 unmodified lines | ||
| 1813 | 1817 | _sharedVoxelSystem.changeTree(&_clipboard); |
| 1814 | 1818 | delete tmpTree; |
| 1815 | 1819 | |
| 1816 | − _voxelImporter.init(_settings); | |
| 1817 | − | |
| 1818 | 1820 | _environment.init(); |
| 1819 | 1821 | |
| 1820 | 1822 | _glowEffect.init(); |