From b6333067f930b39dc88cee7e5726179c605c3102 Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Tue, 10 Jan 2017 22:39:34 +0100 Subject: [PATCH] fix(GUI): make the image selection window a modal (#932) (#1009) The image selection dialog is attached to the parent window so it is a modal. Change-Type: patch Changelog-Entry: Make the image file picker attach to the main window. --- lib/gui/os/dialog/services/dialog.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/gui/os/dialog/services/dialog.js b/lib/gui/os/dialog/services/dialog.js index 7e3de5cd..d9db02fa 100644 --- a/lib/gui/os/dialog/services/dialog.js +++ b/lib/gui/os/dialog/services/dialog.js @@ -40,7 +40,8 @@ module.exports = function($q, SupportedFormatsModel) { */ this.selectImage = () => { return $q((resolve, reject) => { - electron.remote.dialog.showOpenDialog({ + const currentWindow = electron.remote.getCurrentWindow(); + electron.remote.dialog.showOpenDialog(currentWindow, { // This variable is set when running in GNU/Linux from // inside an AppImage, and represents the working directory