9032 - Current display mode can be deselected in the toolbar/tablet menu
Showing the changes to interface/src/Application.cpp (1 of 5 files). Show all
Unified · Split
| @@ -7089,6 +7089,7 @@ DisplayPluginPointer Application::getActiveDisplayPlugin() const { · 7088 unmodified lines | ||
| 7089 | 7089 | return _displayPlugin; |
| 7090 | 7090 | } |
| 7091 | 7091 | |
| 7092 | +static const char* EXCLUSION_GROUP_KEY = "exclusionGroup"; | |
| 7092 | 7093 | |
| 7093 | 7094 | static void addDisplayPluginToMenu(DisplayPluginPointer displayPlugin, bool active = false) { |
| 7094 | 7095 | auto menu = Menu::getInstance(); |
| @@ -7124,6 +7125,8 @@ static void addDisplayPluginToMenu(DisplayPluginPointer displayPlugin, bool acti · 29 unmodified lines | ||
| 7124 | 7125 | action->setCheckable(true); |
| 7125 | 7126 | action->setChecked(active); |
| 7126 | 7127 | displayPluginGroup->addAction(action); |
| 7128 | + | |
| 7129 | + action->setProperty(EXCLUSION_GROUP_KEY, QVariant::fromValue(displayPluginGroup)); | |
| 7127 | 7130 | Q_ASSERT(menu->menuItemExists(MenuOption::OutputMenu, name)); |
| 7128 | 7131 | } |
| 7129 | 7132 | |