Showing the changes to interface/src/Application.cpp (1 of 20 files). Show all
Unified · Split
| @@ -1122,8 +1122,6 @@ Application::~Application() { · 1121 unmodified lines | |||
| 1122 | _octreeProcessor.terminate(); | 1122 | _octreeProcessor.terminate(); |
| 1123 | _entityEditSender.terminate(); | 1123 | _entityEditSender.terminate(); |
| 1124 | 1124 | ||
| 1125 | Menu::getInstance()->deleteLater(); | ||
| 1126 | |||
| 1127 | _physicsEngine->setCharacterController(NULL); | 1125 | _physicsEngine->setCharacterController(NULL); |
| 1128 | 1126 | ||
| 1129 | ModelEntityItem::cleanupLoadedAnimations(); | 1127 | ModelEntityItem::cleanupLoadedAnimations(); |
| @@ -1168,6 +1166,10 @@ Application::~Application() { · 38 unmodified lines | |||
| 1168 | #if 0 | 1166 | #if 0 |
| 1169 | ConnexionClient::getInstance().destroy(); | 1167 | ConnexionClient::getInstance().destroy(); |
| 1170 | #endif | 1168 | #endif |
| 1169 | // The window takes ownership of the menu, so this has the side effect of destroying it. | ||
| 1170 | _window->setMenuBar(nullptr); | ||
| 1171 | |||
| 1172 | _window->deleteLater(); | ||
| 1171 | 1173 | ||
| 1172 | qInstallMessageHandler(NULL); // NOTE: Do this as late as possible so we continue to get our log messages | 1174 | qInstallMessageHandler(NULL); // NOTE: Do this as late as possible so we continue to get our log messages |
| 1173 | } | 1175 | } |
| @@ -1334,7 +1336,7 @@ void Application::initializeUi() { · 160 unmodified lines | |||
| 1334 | _keyboardMouseDevice = std::dynamic_pointer_cast<KeyboardMouseDevice>(inputPlugin); | 1336 | _keyboardMouseDevice = std::dynamic_pointer_cast<KeyboardMouseDevice>(inputPlugin); |
| 1335 | } | 1337 | } |
| 1336 | } | 1338 | } |
| 1337 | Menu::setInstance(); | 1339 | _window->setMenuBar(new Menu()); |
| 1338 | updateInputModes(); | 1340 | updateInputModes(); |
| 1339 | 1341 | ||
| 1340 | auto compositorHelper = DependencyManager::get<CompositorHelper>(); | 1342 | auto compositorHelper = DependencyManager::get<CompositorHelper>(); |