From d1e376de0e15e4d4dda0aa6d0c81c43367352115 Mon Sep 17 00:00:00 2001 From: danteruiz Date: Thu, 7 Mar 2019 14:26:47 -0800 Subject: [PATCH] destroy modal dialogs that prevent interface from getting input --- .../resources/qml/dialogs/CustomQueryDialog.qml | 12 ++---------- interface/resources/qml/dialogs/FileDialog.qml | 2 +- interface/resources/qml/dialogs/QueryDialog.qml | 12 ++---------- 3 files changed, 5 insertions(+), 21 deletions(-) diff --git a/interface/resources/qml/dialogs/CustomQueryDialog.qml b/interface/resources/qml/dialogs/CustomQueryDialog.qml index 026068eee1..2497781db0 100644 --- a/interface/resources/qml/dialogs/CustomQueryDialog.qml +++ b/interface/resources/qml/dialogs/CustomQueryDialog.qml @@ -273,11 +273,7 @@ ModalWindow { onTriggered: { root.result = null; root.canceled(); - // FIXME we are leaking memory to avoid a crash - // root.destroy(); - - root.disableFade = true - visible = false; + root.destroy(); } } @@ -299,11 +295,7 @@ ModalWindow { } root.result = JSON.stringify(result); root.selected(root.result); - // FIXME we are leaking memory to avoid a crash - // root.destroy(); - - root.disableFade = true - visible = false; + root.destroy(); } } } diff --git a/interface/resources/qml/dialogs/FileDialog.qml b/interface/resources/qml/dialogs/FileDialog.qml index c1509e0fc1..ba5e162391 100644 --- a/interface/resources/qml/dialogs/FileDialog.qml +++ b/interface/resources/qml/dialogs/FileDialog.qml @@ -815,7 +815,7 @@ ModalWindow { Action { id: cancelAction text: "Cancel" - onTriggered: { canceled(); root.shown = false; } + onTriggered: { canceled(); root.destroy(); } } } diff --git a/interface/resources/qml/dialogs/QueryDialog.qml b/interface/resources/qml/dialogs/QueryDialog.qml index 9cfb3011bd..41ded7e934 100644 --- a/interface/resources/qml/dialogs/QueryDialog.qml +++ b/interface/resources/qml/dialogs/QueryDialog.qml @@ -168,11 +168,7 @@ ModalWindow { shortcut: "Esc" onTriggered: { root.canceled(); - // FIXME we are leaking memory to avoid a crash - // root.destroy(); - - root.disableFade = true - visible = false; + root.destroy(); } } @@ -183,11 +179,7 @@ ModalWindow { onTriggered: { root.result = items ? comboBox.currentText : textResult.text root.selected(root.result); - // FIXME we are leaking memory to avoid a crash - // root.destroy(); - - root.disableFade = true - visible = false; + root.destroy(); } } }