Merge pull request #13273 from danteruiz/fix-show-overlays-menu

fixing show overlays menu item on start up
This commit is contained in:
John Conklin II 2018-06-07 11:34:30 -07:00 committed by GitHub
commit 1646f543cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4751,12 +4751,15 @@ void Application::loadSettings() {
// DONT CHECK IN
//DependencyManager::get<LODManager>()->setAutomaticLODAdjust(false);
Menu::getInstance()->loadSettings();
auto menu = Menu::getInstance();
menu->loadSettings();
// override the menu option show overlays to always be true on startup
menu->setIsOptionChecked(MenuOption::Overlays, true);
// If there is a preferred plugin, we probably messed it up with the menu settings, so fix it.
auto pluginManager = PluginManager::getInstance();
auto plugins = pluginManager->getPreferredDisplayPlugins();
auto menu = Menu::getInstance();
if (plugins.size() > 0) {
for (auto plugin : plugins) {
if (auto action = menu->getActionForOption(plugin->getName())) {