mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 21:33:09 +02:00
Merge pull request #3319 from Atlante45/sitting_points_not_disappearing_when_switching_to_fake_domain
fix sitting points on domain switch
This commit is contained in:
commit
a51cace167
3 changed files with 7 additions and 2 deletions
|
@ -269,8 +269,7 @@ function update(deltaTime){
|
|||
}
|
||||
|
||||
var locationChanged = false;
|
||||
if (location.hostname != oldHost) {
|
||||
print("Changed domain");
|
||||
if (location.hostname != oldHost || !location.isConnected) {
|
||||
for (model in models) {
|
||||
removeIndicators(models[model]);
|
||||
}
|
||||
|
|
|
@ -20,6 +20,10 @@ LocationScriptingInterface* LocationScriptingInterface::getInstance() {
|
|||
return &sharedInstance;
|
||||
}
|
||||
|
||||
bool LocationScriptingInterface::isConnected() {
|
||||
return NodeList::getInstance()->getDomainHandler().isConnected();
|
||||
}
|
||||
|
||||
QString LocationScriptingInterface::getHref() {
|
||||
return getProtocol() + "//" + getHostname() + getPathname();
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
class LocationScriptingInterface : public QObject {
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(bool isConnected READ isConnected)
|
||||
Q_PROPERTY(QString href READ getHref)
|
||||
Q_PROPERTY(QString protocol READ getProtocol)
|
||||
Q_PROPERTY(QString hostname READ getHostname)
|
||||
|
@ -30,6 +31,7 @@ class LocationScriptingInterface : public QObject {
|
|||
public:
|
||||
static LocationScriptingInterface* getInstance();
|
||||
|
||||
bool isConnected();
|
||||
QString getHref();
|
||||
QString getProtocol() { return CUSTOM_URL_SCHEME; };
|
||||
QString getPathname();
|
||||
|
|
Loading…
Reference in a new issue