close the tablet when going to a new domain

This commit is contained in:
Seth Alves 2017-01-23 16:28:56 -08:00
parent 200105c856
commit 69252deb2e
2 changed files with 6 additions and 0 deletions

View file

@ -87,6 +87,7 @@ public:
bool isMounted() const;
void toggleShouldShowTablet() { _showTablet = !_showTablet; }
void setShouldShowTablet(bool value) { _showTablet = value; }
bool getShouldShowTablet() const { return _showTablet; }
void setCurrentTabletUIID(QUuid tabletID) { _tabletUIID = tabletID; }

View file

@ -17,6 +17,7 @@
#include "DependencyManager.h"
#include "AddressManager.h"
#include "DialogsManager.h"
#include "scripting/HMDScriptingInterface.h"
HIFI_QML_DEF(AddressBarDialog)
@ -46,6 +47,8 @@ AddressBarDialog::AddressBarDialog(QQuickItem* parent) : OffscreenQmlDialog(pare
void AddressBarDialog::loadAddress(const QString& address, bool fromSuggestions) {
qDebug() << "Called LoadAddress with address " << address;
if (!address.isEmpty()) {
auto HMD = DependencyManager::get<HMDScriptingInterface>();
HMD->setShouldShowTablet(false);
DependencyManager::get<AddressManager>()->handleLookupString(address, fromSuggestions);
}
}
@ -57,6 +60,8 @@ void AddressBarDialog::loadHome() {
if (homeLocation == "") {
homeLocation = DEFAULT_HOME_LOCATION;
}
auto HMD = DependencyManager::get<HMDScriptingInterface>();
HMD->setShouldShowTablet(false);
DependencyManager::get<AddressManager>()->handleLookupString(homeLocation);
}