mirror of
https://github.com/overte-org/overte.git
synced 2025-07-10 22:58:43 +02:00
5830: Go-To menu shows up blank except for address bar
This commit is contained in:
parent
42f6333948
commit
9cd784990c
3 changed files with 19 additions and 5 deletions
|
@ -35,7 +35,6 @@ Column {
|
||||||
property string metaverseServerUrl: '';
|
property string metaverseServerUrl: '';
|
||||||
property string actions: 'snapshot';
|
property string actions: 'snapshot';
|
||||||
// sendToScript doesn't get wired until after everything gets created. So we have to queue fillDestinations on nextTick.
|
// sendToScript doesn't get wired until after everything gets created. So we have to queue fillDestinations on nextTick.
|
||||||
Component.onCompleted: delay.start();
|
|
||||||
property string labelText: actions;
|
property string labelText: actions;
|
||||||
property string filter: '';
|
property string filter: '';
|
||||||
onFilterChanged: filterChoicesByText();
|
onFilterChanged: filterChoicesByText();
|
||||||
|
@ -125,11 +124,9 @@ Column {
|
||||||
cb();
|
cb();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
property var delay: Timer { // No setTimeout or nextTick in QML.
|
|
||||||
interval: 0;
|
|
||||||
onTriggered: fillDestinations();
|
|
||||||
}
|
|
||||||
function fillDestinations() { // Public
|
function fillDestinations() { // Public
|
||||||
|
console.debug('Feed::fillDestinations()')
|
||||||
|
|
||||||
function report(label, error) {
|
function report(label, error) {
|
||||||
console.log(label, actions, error || 'ok', allStories.length, 'filtered to', suggestions.count);
|
console.log(label, actions, error || 'ok', allStories.length, 'filtered to', suggestions.count);
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,11 +39,24 @@ StackView {
|
||||||
property var rpcCounter: 0;
|
property var rpcCounter: 0;
|
||||||
signal sendToScript(var message);
|
signal sendToScript(var message);
|
||||||
function rpc(method, parameters, callback) {
|
function rpc(method, parameters, callback) {
|
||||||
|
console.debug('TabletAddressDialog: rpc: method = ', method, 'parameters = ', parameters, 'callback = ', callback)
|
||||||
|
|
||||||
rpcCalls[rpcCounter] = callback;
|
rpcCalls[rpcCounter] = callback;
|
||||||
var message = {method: method, params: parameters, id: rpcCounter++, jsonrpc: "2.0"};
|
var message = {method: method, params: parameters, id: rpcCounter++, jsonrpc: "2.0"};
|
||||||
sendToScript(message);
|
sendToScript(message);
|
||||||
}
|
}
|
||||||
function fromScript(message) {
|
function fromScript(message) {
|
||||||
|
if (message.method === 'refreshFeeds') {
|
||||||
|
var feeds = [happeningNow, places, snapshots];
|
||||||
|
console.debug('TabletAddressDialog::fromScript: refreshFeeds', 'feeds = ', feeds);
|
||||||
|
|
||||||
|
feeds.forEach(function(feed) {
|
||||||
|
Qt.callLater(feed.fillDestinations);
|
||||||
|
});
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var callback = rpcCalls[message.id];
|
var callback = rpcCalls[message.id];
|
||||||
if (!callback) {
|
if (!callback) {
|
||||||
console.log('No callback for message fromScript', JSON.stringify(message));
|
console.log('No callback for message fromScript', JSON.stringify(message));
|
||||||
|
|
|
@ -42,6 +42,8 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
function fromQml(message) {
|
function fromQml(message) {
|
||||||
|
console.debug('tablet-goto::fromQml: message = ', JSON.stringify(message));
|
||||||
|
|
||||||
var response = {id: message.id, jsonrpc: "2.0"};
|
var response = {id: message.id, jsonrpc: "2.0"};
|
||||||
switch (message.method) {
|
switch (message.method) {
|
||||||
case 'request':
|
case 'request':
|
||||||
|
@ -98,6 +100,8 @@
|
||||||
button.editProperties({isActive: shouldActivateButton});
|
button.editProperties({isActive: shouldActivateButton});
|
||||||
wireEventBridge(true);
|
wireEventBridge(true);
|
||||||
messagesWaiting(false);
|
messagesWaiting(false);
|
||||||
|
tablet.sendToQml({ method: 'refreshFeeds' })
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
shouldActivateButton = false;
|
shouldActivateButton = false;
|
||||||
onGotoScreen = false;
|
onGotoScreen = false;
|
||||||
|
|
Loading…
Reference in a new issue