History

Merge branch 'master' of https://github.com/highfidelity/hifi

Stephen Birarda committed 12 years ago

Commit 7f9794d2 parents ee9f893 8ede0ed9 files · +287 −223Browse files

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

Unified · Split

interface/src/Application.cpp+28−11
@@ -309,8 +309,13 @@ Application::~Application() { · 308 unmodified lines
309 delete idleTimer;309 delete idleTimer;
310 310
311 Menu::getInstance()->saveSettings();311 Menu::getInstance()->saveSettings();
312
313 _rearMirrorTools->saveSettings(_settings);312 _rearMirrorTools->saveSettings(_settings);
313
314 _sharedVoxelSystem.changeTree(new VoxelTree);
315 if (_voxelImporter) {
316 _voxelImporter->saveSettings(_settings);
317 delete _voxelImporter;
318 }
314 _settings->sync();319 _settings->sync();
315 320
316 // let the avatar mixer know we're out321 // let the avatar mixer know we're out
@@ -331,7 +336,6 @@ Application::~Application() { · 14 unmodified lines
331 336
332 storeSizeAndPosition();337 storeSizeAndPosition();
333 saveScripts();338 saveScripts();
334 _sharedVoxelSystem.changeTree(new VoxelTree);
335 339
336 VoxelTreeElement::removeDeleteHook(&_voxels); // we don't need to do this processing on shutdown340 VoxelTreeElement::removeDeleteHook(&_voxels); // we don't need to do this processing on shutdown
337 Menu::getInstance()->deleteLater();341 Menu::getInstance()->deleteLater();
@@ -1299,8 +1303,14 @@ void Application::mousePressEvent(QMouseEvent* event) { · 961 unmodified lines
1299 pasteVoxels();1303 pasteVoxels();
1300 }1304 }
1301 1305
1302 } else if (event->button() == Qt::RightButton && Menu::getInstance()->isVoxelModeActionChecked()) {1306 } else if (event->button() == Qt::RightButton) {
1303 deleteVoxelUnderCursor();1307 if (Menu::getInstance()->isVoxelModeActionChecked()) {
1308 deleteVoxelUnderCursor();
1309 }
1310 if (_pasteMode) {
1311 _pasteMode = false;
1312 }
1313
1304 }1314 }
1305 }1315 }
1306}1316}
@@ -1710,13 +1720,19 @@ void Application::exportVoxels() { · 403 unmodified lines
1710void Application::importVoxels() {1720void Application::importVoxels() {
1711 if (!_voxelImporter) {1721 if (!_voxelImporter) {
1712 _voxelImporter = new VoxelImporter(_window);1722 _voxelImporter = new VoxelImporter(_window);
1713 _voxelImporter->init(_settings);1723 _voxelImporter->loadSettings(_settings);
1714 }1724 }
1715 1725
1716 if (_voxelImporter->exec()) {1726 if (!_voxelImporter->exec()) {
1717 qDebug("[DEBUG] Import succeeded.");1727 qDebug() << "[DEBUG] Import succeeded." << endl;
1728 Menu::getInstance()->setIsOptionChecked(MenuOption::VoxelSelectMode, true);
1729 _pasteMode = true;
1718 } else {1730 } else {
1719 qDebug("[DEBUG] Import failed.");1731 qDebug() << "[DEBUG] Import failed." << endl;
1732 if (_sharedVoxelSystem.getTree() == _voxelImporter->getVoxelTree()) {
1733 _sharedVoxelSystem.killLocalVoxels();
1734 _sharedVoxelSystem.changeTree(&_clipboard);
1735 }
1720 }1736 }
1721 1737
1722 // restore the main window's active state1738 // restore the main window's active state
@@ -1773,10 +1789,11 @@ void Application::pasteVoxels() { · 50 unmodified lines
1773 }1789 }
1774 1790
1775 pasteVoxelsToOctalCode(octalCodeDestination);1791 pasteVoxelsToOctalCode(octalCodeDestination);
1776 1792
1777 if (calculatedOctCode) {1793 if (calculatedOctCode) {
1778 delete[] calculatedOctCode;1794 delete[] calculatedOctCode;
1779 }1795 }
1796 _pasteMode = false;
1780}1797}
1781 1798
1782void Application::findAxisAlignment() {1799void Application::findAxisAlignment() {
@@ -1848,6 +1865,7 @@ void Application::init() { · 65 unmodified lines
1848 1865
1849 VoxelTreeElement::removeUpdateHook(&_sharedVoxelSystem);1866 VoxelTreeElement::removeUpdateHook(&_sharedVoxelSystem);
1850 1867
1868 // Cleanup of the original shared tree
1851 _sharedVoxelSystem.init();1869 _sharedVoxelSystem.init();
1852 VoxelTree* tmpTree = _sharedVoxelSystem.getTree();1870 VoxelTree* tmpTree = _sharedVoxelSystem.getTree();
1853 _sharedVoxelSystem.changeTree(&_clipboard);1871 _sharedVoxelSystem.changeTree(&_clipboard);
@@ -1939,12 +1957,11 @@ void Application::init() { · 85 unmodified lines
1939 _audio.init(_glWidget);1957 _audio.init(_glWidget);
1940 1958
1941 _rearMirrorTools = new RearMirrorTools(_glWidget, _mirrorViewRect, _settings);1959 _rearMirrorTools = new RearMirrorTools(_glWidget, _mirrorViewRect, _settings);
1960
1942 connect(_rearMirrorTools, SIGNAL(closeView()), SLOT(closeMirrorView()));1961 connect(_rearMirrorTools, SIGNAL(closeView()), SLOT(closeMirrorView()));
1943 connect(_rearMirrorTools, SIGNAL(restoreView()), SLOT(restoreMirrorView()));1962 connect(_rearMirrorTools, SIGNAL(restoreView()), SLOT(restoreMirrorView()));
1944 connect(_rearMirrorTools, SIGNAL(shrinkView()), SLOT(shrinkMirrorView()));1963 connect(_rearMirrorTools, SIGNAL(shrinkView()), SLOT(shrinkMirrorView()));
1945 connect(_rearMirrorTools, SIGNAL(resetView()), SLOT(resetSensors()));1964 connect(_rearMirrorTools, SIGNAL(resetView()), SLOT(resetSensors()));
1946
1947
1948}1965}
1949 1966
1950void Application::closeMirrorView() {1967void Application::closeMirrorView() {

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