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