mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 18:41:10 +02:00
Fix the recursive launching of load script from URL
This commit is contained in:
parent
462758ebdd
commit
8dc066fc00
2 changed files with 21 additions and 2 deletions
|
@ -167,7 +167,7 @@ FocusScope {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (setFocus) {
|
if (setFocus) {
|
||||||
focus = true;
|
targetWindow.focus = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
reposition(targetWindow);
|
reposition(targetWindow);
|
||||||
|
|
|
@ -184,9 +184,28 @@ Window {
|
||||||
anchors.bottom: filterEdit.top
|
anchors.bottom: filterEdit.top
|
||||||
anchors.bottomMargin: 8
|
anchors.bottomMargin: 8
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
|
||||||
|
// For some reason trigginer an API that enters
|
||||||
|
// an internal event loop directly from the button clicked
|
||||||
|
// trigger below causes the appliction to behave oddly.
|
||||||
|
// Most likely because the button onClicked handling is never
|
||||||
|
// completed until the function returns.
|
||||||
|
// FIXME find a better way of handling the input dialogs that
|
||||||
|
// doesn't trigger this.
|
||||||
|
Timer {
|
||||||
|
id: asyncAction
|
||||||
|
interval: 50
|
||||||
|
repeat: false
|
||||||
|
running: false
|
||||||
|
onTriggered: ApplicationInterface.loadScriptURLDialog();
|
||||||
|
}
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
text: "from URL";
|
text: "from URL";
|
||||||
onClicked: ApplicationInterface.loadScriptURLDialog();
|
onClicked: {
|
||||||
|
focus = false;
|
||||||
|
asyncAction.running = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
text: "from Disk"
|
text: "from Disk"
|
||||||
|
|
Loading…
Reference in a new issue