Allow the user to bring up the tablet when a message is open in the tablet

This commit is contained in:
Dante Ruiz 2017-03-15 00:02:42 +01:00
parent 08ee2fd43f
commit 45829574c2

View file

@ -1625,9 +1625,10 @@ QString Application::getUserAgent() {
void Application::toggleTabletUI() const {
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
auto hmd = DependencyManager::get<HMDScriptingInterface>();
TabletProxy* tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system"));
bool messageOpen = tablet->isMessageDialogOpen();
if (!messageOpen) {
if (!messageOpen || (messageOpen && !hmd->getShouldShowTablet())) {
auto HMD = DependencyManager::get<HMDScriptingInterface>();
HMD->toggleShouldShowTablet();
}