mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 19:41:20 +02:00
Merge pull request #13278 from SimonWalton-HiFi/tablet-popup-remains
Domain-unreachable message remaining on slow connects
This commit is contained in:
commit
10e34000aa
5 changed files with 40 additions and 0 deletions
|
@ -65,6 +65,18 @@ Item {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function closeDialog() {
|
||||||
|
if (openMessage != null) {
|
||||||
|
openMessage.destroy();
|
||||||
|
openMessage = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (openModal != null) {
|
||||||
|
openModal.destroy();
|
||||||
|
openModal = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function isUrlLoaded(url) {
|
function isUrlLoaded(url) {
|
||||||
if (currentApp >= 0) {
|
if (currentApp >= 0) {
|
||||||
var currentAppUrl = tabletApps.get(currentApp).appUrl;
|
var currentAppUrl = tabletApps.get(currentApp).appUrl;
|
||||||
|
|
|
@ -93,10 +93,18 @@ void DialogsManager::setDomainConnectionFailureVisibility(bool visible) {
|
||||||
static const QUrl url("dialogs/TabletConnectionFailureDialog.qml");
|
static const QUrl url("dialogs/TabletConnectionFailureDialog.qml");
|
||||||
auto hmd = DependencyManager::get<HMDScriptingInterface>();
|
auto hmd = DependencyManager::get<HMDScriptingInterface>();
|
||||||
if (visible) {
|
if (visible) {
|
||||||
|
_dialogCreatedWhileShown = tablet->property("tabletShown").toBool();
|
||||||
tablet->initialScreen(url);
|
tablet->initialScreen(url);
|
||||||
if (!hmd->getShouldShowTablet()) {
|
if (!hmd->getShouldShowTablet()) {
|
||||||
hmd->openTablet();
|
hmd->openTablet();
|
||||||
}
|
}
|
||||||
|
} else if (tablet->isPathLoaded(url)) {
|
||||||
|
tablet->closeDialog();
|
||||||
|
tablet->gotoHomeScreen();
|
||||||
|
if (!_dialogCreatedWhileShown) {
|
||||||
|
hmd->closeTablet();
|
||||||
|
}
|
||||||
|
_dialogCreatedWhileShown = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,6 +80,7 @@ private:
|
||||||
QPointer<OctreeStatsDialog> _octreeStatsDialog;
|
QPointer<OctreeStatsDialog> _octreeStatsDialog;
|
||||||
QPointer<TestingDialog> _testingDialog;
|
QPointer<TestingDialog> _testingDialog;
|
||||||
QPointer<DomainConnectionDialog> _domainConnectionDialog;
|
QPointer<DomainConnectionDialog> _domainConnectionDialog;
|
||||||
|
bool _dialogCreatedWhileShown { false };
|
||||||
bool _addressBarVisible { false };
|
bool _addressBarVisible { false };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -431,6 +431,19 @@ bool TabletProxy::isMessageDialogOpen() {
|
||||||
return result.toBool();
|
return result.toBool();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TabletProxy::closeDialog() {
|
||||||
|
if (QThread::currentThread() != thread()) {
|
||||||
|
QMetaObject::invokeMethod(this, "closeDialog");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!_qmlTabletRoot) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QMetaObject::invokeMethod(_qmlTabletRoot, "closeDialog");
|
||||||
|
}
|
||||||
|
|
||||||
void TabletProxy::emitWebEvent(const QVariant& msg) {
|
void TabletProxy::emitWebEvent(const QVariant& msg) {
|
||||||
if (QThread::currentThread() != thread()) {
|
if (QThread::currentThread() != thread()) {
|
||||||
QMetaObject::invokeMethod(this, "emitWebEvent", Q_ARG(QVariant, msg));
|
QMetaObject::invokeMethod(this, "emitWebEvent", Q_ARG(QVariant, msg));
|
||||||
|
|
|
@ -308,6 +308,12 @@ public:
|
||||||
*/
|
*/
|
||||||
Q_INVOKABLE bool isMessageDialogOpen();
|
Q_INVOKABLE bool isMessageDialogOpen();
|
||||||
|
|
||||||
|
/**jsdoc
|
||||||
|
* Close any open dialogs.
|
||||||
|
* @function TabletProxy#closeDialog
|
||||||
|
*/
|
||||||
|
Q_INVOKABLE void closeDialog();
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* Creates a new button, adds it to this and returns it.
|
* Creates a new button, adds it to this and returns it.
|
||||||
* @function TabletProxy#addButton
|
* @function TabletProxy#addButton
|
||||||
|
|
Loading…
Reference in a new issue