Showing the changes to interface/src/Application.cpp (1 of 11 files). Show all
Unified · Split
| @@ -356,9 +356,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 355 unmodified lines | |||
| 356 | 356 | ||
| 357 | connect(addressManager.data(), &AddressManager::rootPlaceNameChanged, this, &Application::updateWindowTitle); | 357 | connect(addressManager.data(), &AddressManager::rootPlaceNameChanged, this, &Application::updateWindowTitle); |
| 358 | 358 | ||
| 359 | _settings = new QSettings(this); | ||
| 360 | _numChangedSettings = 0; | ||
| 361 | |||
| 362 | #ifdef _WIN32 | 359 | #ifdef _WIN32 |
| 363 | WSADATA WsaData; | 360 | WSADATA WsaData; |
| 364 | int wsaresult = WSAStartup(MAKEWORD(2,2), &WsaData); | 361 | int wsaresult = WSAStartup(MAKEWORD(2,2), &WsaData); |
| @@ -514,10 +511,6 @@ Application::~Application() { · 149 unmodified lines | |||
| 514 | 511 | ||
| 515 | void Application::saveSettings() { | 512 | void Application::saveSettings() { |
| 516 | Menu::getInstance()->saveSettings(); | 513 | Menu::getInstance()->saveSettings(); |
| 517 | _rearMirrorTools->saveSettings(_settings); | ||
| 518 | |||
| 519 | _settings->sync(); | ||
| 520 | _numChangedSettings = 0; | ||
| 521 | } | 514 | } |
| 522 | 515 | ||
| 523 | void Application::initializeGL() { | 516 | void Application::initializeGL() { |
| @@ -1439,10 +1432,6 @@ void Application::idle() { · 915 unmodified lines | |||
| 1439 | 1432 | ||
| 1440 | // After finishing all of the above work, restart the idle timer, allowing 2ms to process events. | 1433 | // After finishing all of the above work, restart the idle timer, allowing 2ms to process events. |
| 1441 | idleTimer->start(2); | 1434 | idleTimer->start(2); |
| 1442 | |||
| 1443 | if (_numChangedSettings > 0) { | ||
| 1444 | saveSettings(); | ||
| 1445 | } | ||
| 1446 | } | 1435 | } |
| 1447 | } | 1436 | } |
| 1448 | } | 1437 | } |
| @@ -1711,16 +1700,13 @@ void Application::init() { · 262 unmodified lines | |||
| 1711 | _metavoxels.init(); | 1700 | _metavoxels.init(); |
| 1712 | 1701 | ||
| 1713 | auto glCanvas = DependencyManager::get<GLCanvas>(); | 1702 | auto glCanvas = DependencyManager::get<GLCanvas>(); |
| 1714 | _rearMirrorTools = new RearMirrorTools(glCanvas.data(), _mirrorViewRect, _settings); | 1703 | _rearMirrorTools = new RearMirrorTools(glCanvas.data(), _mirrorViewRect); |
| 1715 | 1704 | ||
| 1716 | connect(_rearMirrorTools, SIGNAL(closeView()), SLOT(closeMirrorView())); | 1705 | connect(_rearMirrorTools, SIGNAL(closeView()), SLOT(closeMirrorView())); |
| 1717 | connect(_rearMirrorTools, SIGNAL(restoreView()), SLOT(restoreMirrorView())); | 1706 | connect(_rearMirrorTools, SIGNAL(restoreView()), SLOT(restoreMirrorView())); |
| 1718 | connect(_rearMirrorTools, SIGNAL(shrinkView()), SLOT(shrinkMirrorView())); | 1707 | connect(_rearMirrorTools, SIGNAL(shrinkView()), SLOT(shrinkMirrorView())); |
| 1719 | connect(_rearMirrorTools, SIGNAL(resetView()), SLOT(resetSensors())); | 1708 | connect(_rearMirrorTools, SIGNAL(resetView()), SLOT(resetSensors())); |
| 1720 | 1709 | ||
| 1721 | // save settings when avatar changes | ||
| 1722 | connect(_myAvatar, &MyAvatar::transformChanged, this, &Application::bumpSettings); | ||
| 1723 | |||
| 1724 | #ifdef USE_BULLET_PHYSICS | 1710 | #ifdef USE_BULLET_PHYSICS |
| 1725 | EntityTree* tree = _entities.getTree(); | 1711 | EntityTree* tree = _entities.getTree(); |
| 1726 | _physicsEngine.setEntityTree(tree); | 1712 | _physicsEngine.setEntityTree(tree); |
| @@ -3551,7 +3537,6 @@ ScriptEngine* Application::loadScript(const QString& scriptFilename, bool isUser · 1824 unmodified lines | |||
| 3551 | if (activateMainWindow && !loadScriptFromEditor) { | 3537 | if (activateMainWindow && !loadScriptFromEditor) { |
| 3552 | _window->activateWindow(); | 3538 | _window->activateWindow(); |
| 3553 | } | 3539 | } |
| 3554 | bumpSettings(); | ||
| 3555 | 3540 | ||
| 3556 | return scriptEngine; | 3541 | return scriptEngine; |
| 3557 | } | 3542 | } |
| @@ -3579,7 +3564,6 @@ void Application::scriptFinished(const QString& scriptName) { · 21 unmodified lines | |||
| 3579 | _scriptEnginesHash.erase(it); | 3564 | _scriptEnginesHash.erase(it); |
| 3580 | _runningScriptsWidget->scriptStopped(scriptName); | 3565 | _runningScriptsWidget->scriptStopped(scriptName); |
| 3581 | _runningScriptsWidget->setRunningScripts(getRunningScripts()); | 3566 | _runningScriptsWidget->setRunningScripts(getRunningScripts()); |
| 3582 | bumpSettings(); | ||
| 3583 | } | 3567 | } |
| 3584 | } | 3568 | } |
| 3585 | 3569 | ||
| @@ -3675,7 +3659,6 @@ void Application::openUrl(const QUrl& url) { · 89 unmodified lines | |||
| 3675 | } | 3659 | } |
| 3676 | 3660 | ||
| 3677 | void Application::updateMyAvatarTransform() { | 3661 | void Application::updateMyAvatarTransform() { |
| 3678 | bumpSettings(); | ||
| 3679 | #ifdef USE_BULLET_PHYSICS | 3662 | #ifdef USE_BULLET_PHYSICS |
| 3680 | const float SIMULATION_OFFSET_QUANTIZATION = 16.0f; // meters | 3663 | const float SIMULATION_OFFSET_QUANTIZATION = 16.0f; // meters |
| 3681 | glm::vec3 avatarPosition = _myAvatar->getPosition(); | 3664 | glm::vec3 avatarPosition = _myAvatar->getPosition(); |