Merge pull request #9891 from druiz17/tablet-xbox-fix

Allow the user to bring up the tablet when a message is open
This commit is contained in:
Seth Alves 2017-03-15 08:43:28 -08:00 committed by GitHub
commit c53b0dff93

View file

@ -1631,9 +1631,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();
}