mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 02:56:50 +02:00
Fix GOTO dialog's connection status and location not always updating
This commit is contained in:
parent
0d21e0be11
commit
c5c1ead400
2 changed files with 7 additions and 3 deletions
|
@ -84,7 +84,6 @@ StackView {
|
||||||
anchors.centerIn = parent;
|
anchors.centerIn = parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function resetAfterTeleport() {
|
function resetAfterTeleport() {
|
||||||
//storyCardFrame.shown = root.shown = false;
|
//storyCardFrame.shown = root.shown = false;
|
||||||
}
|
}
|
||||||
|
@ -135,7 +134,8 @@ StackView {
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
}
|
}
|
||||||
|
|
||||||
onHostChanged: updateLocationTextTimer.start();
|
onHostChanged: updateLocationTextTimer.restart();
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: navBar
|
id: navBar
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
@ -358,7 +358,7 @@ StackView {
|
||||||
// Delay updating location text a bit to avoid flicker of content and so that connection status is valid.
|
// Delay updating location text a bit to avoid flicker of content and so that connection status is valid.
|
||||||
id: updateLocationTextTimer
|
id: updateLocationTextTimer
|
||||||
running: false
|
running: false
|
||||||
interval: 500 // ms
|
interval: 1000 // ms
|
||||||
repeat: false
|
repeat: false
|
||||||
onTriggered: updateLocationText(false);
|
onTriggered: updateLocationText(false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,6 +40,10 @@ AddressBarDialog::AddressBarDialog(QQuickItem* parent) : OffscreenQmlDialog(pare
|
||||||
_backEnabled = !(DependencyManager::get<AddressManager>()->getBackStack().isEmpty());
|
_backEnabled = !(DependencyManager::get<AddressManager>()->getBackStack().isEmpty());
|
||||||
_forwardEnabled = !(DependencyManager::get<AddressManager>()->getForwardStack().isEmpty());
|
_forwardEnabled = !(DependencyManager::get<AddressManager>()->getForwardStack().isEmpty());
|
||||||
connect(addressManager.data(), &AddressManager::hostChanged, this, &AddressBarDialog::hostChanged);
|
connect(addressManager.data(), &AddressManager::hostChanged, this, &AddressBarDialog::hostChanged);
|
||||||
|
auto nodeList = DependencyManager::get<NodeList>();
|
||||||
|
const DomainHandler& domainHandler = nodeList->getDomainHandler();
|
||||||
|
connect(&domainHandler, &DomainHandler::connectedToDomain, this, &AddressBarDialog::hostChanged);
|
||||||
|
connect(&domainHandler, &DomainHandler::disconnectedFromDomain, this, &AddressBarDialog::hostChanged);
|
||||||
connect(DependencyManager::get<DialogsManager>().data(), &DialogsManager::setUseFeed, this, &AddressBarDialog::setUseFeed);
|
connect(DependencyManager::get<DialogsManager>().data(), &DialogsManager::setUseFeed, this, &AddressBarDialog::setUseFeed);
|
||||||
connect(qApp, &Application::receivedHifiSchemeURL, this, &AddressBarDialog::receivedHifiSchemeURL);
|
connect(qApp, &Application::receivedHifiSchemeURL, this, &AddressBarDialog::receivedHifiSchemeURL);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue