mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 19:34:02 +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) {
|
||||
focus = true;
|
||||
targetWindow.focus = true;
|
||||
}
|
||||
|
||||
reposition(targetWindow);
|
||||
|
|
|
@ -184,9 +184,28 @@ Window {
|
|||
anchors.bottom: filterEdit.top
|
||||
anchors.bottomMargin: 8
|
||||
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 {
|
||||
text: "from URL";
|
||||
onClicked: ApplicationInterface.loadScriptURLDialog();
|
||||
onClicked: {
|
||||
focus = false;
|
||||
asyncAction.running = true;
|
||||
}
|
||||
}
|
||||
Button {
|
||||
text: "from Disk"
|
||||
|
|
Loading…
Reference in a new issue