Showing the changes to interface/src/ui/OverlayConductor.cpp (1 of 7 files). Show all
Unified · Split
| @@ -110,9 +110,12 @@ void OverlayConductor::setEnabled(bool enabled) { · 109 unmodified lines | |||
| 110 | return; | 110 | return; |
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | qDebug() << "OverlayConductor::setEnabled() enabled:" << enabled; | ||
| 113 | Menu::getInstance()->setIsOptionChecked(MenuOption::Overlays, enabled); | 114 | Menu::getInstance()->setIsOptionChecked(MenuOption::Overlays, enabled); |
| 114 | 115 | ||
| 115 | if (_enabled) { | 116 | _enabled = enabled; // set the new value |
| 117 | |||
| 118 | if (!_enabled) { | ||
| 116 | // alpha fadeOut the overlay mesh. | 119 | // alpha fadeOut the overlay mesh. |
| 117 | qApp->getApplicationCompositor().fadeOut(); | 120 | qApp->getApplicationCompositor().fadeOut(); |
| 118 | 121 | ||
| @@ -122,8 +125,6 @@ void OverlayConductor::setEnabled(bool enabled) { · 3 unmodified lines | |||
| 122 | // disable QML events | 125 | // disable QML events |
| 123 | auto offscreenUi = DependencyManager::get<OffscreenUi>(); | 126 | auto offscreenUi = DependencyManager::get<OffscreenUi>(); |
| 124 | offscreenUi->getRootItem()->setEnabled(false); | 127 | offscreenUi->getRootItem()->setEnabled(false); |
| 125 | |||
| 126 | _enabled = false; | ||
| 127 | } else { | 128 | } else { |
| 128 | // alpha fadeIn the overlay mesh. | 129 | // alpha fadeIn the overlay mesh. |
| 129 | qApp->getApplicationCompositor().fadeIn(); | 130 | qApp->getApplicationCompositor().fadeIn(); |
| @@ -144,8 +145,6 @@ void OverlayConductor::setEnabled(bool enabled) { · 14 unmodified lines | |||
| 144 | t.setRotation(glm::quat_cast(camMat)); | 145 | t.setRotation(glm::quat_cast(camMat)); |
| 145 | qApp->getApplicationCompositor().setModelTransform(t); | 146 | qApp->getApplicationCompositor().setModelTransform(t); |
| 146 | } | 147 | } |
| 147 | |||
| 148 | _enabled = true; | ||
| 149 | } | 148 | } |
| 150 | } | 149 | } |
| 151 | 150 | ||