mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 11:45:36 +02:00
fix sitting points on domain switch
This commit is contained in:
parent
63df2b2372
commit
1acce5c725
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