From 7e748899f35a281486a10bf1b0f4d6758e5fb7e8 Mon Sep 17 00:00:00 2001 From: vito Date: Thu, 7 Jun 2018 18:37:09 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-8393=20=E6=8F=92=E4=BB=B6=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E7=95=8C=E9=9D=A2=E6=97=A0=E6=B3=95=E5=90=AF=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer-realize/src/com/fr/start/fx/SplashFx.java | 3 ++- .../src/com/fr/start/fx/SplashFxWindow.java | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/designer-realize/src/com/fr/start/fx/SplashFx.java b/designer-realize/src/com/fr/start/fx/SplashFx.java index 7970e204fa..aef6d81b20 100644 --- a/designer-realize/src/com/fr/start/fx/SplashFx.java +++ b/designer-realize/src/com/fr/start/fx/SplashFx.java @@ -23,6 +23,7 @@ public class SplashFx implements SplashStrategy { @Override public void show() { + Platform.setImplicitExit(false); SERVICE.execute(new Runnable() { @Override public void run() { @@ -34,7 +35,7 @@ public class SplashFx implements SplashStrategy { @Override public void hide() { - Platform.exit(); + fxWindow.close(); } @Override diff --git a/designer-realize/src/com/fr/start/fx/SplashFxWindow.java b/designer-realize/src/com/fr/start/fx/SplashFxWindow.java index 486ba69b60..451fad60db 100644 --- a/designer-realize/src/com/fr/start/fx/SplashFxWindow.java +++ b/designer-realize/src/com/fr/start/fx/SplashFxWindow.java @@ -115,6 +115,19 @@ public class SplashFxWindow extends Application { primaryStage.show(); } + public void close() { + Platform.runLater(new Runnable() { + @Override + public void run() { + try { + ((Stage) moduleInfo.getScene().getWindow()).close(); + } catch (Exception e) { + FRContext.getLogger().error(e.getMessage(), e); + } + } + }); + } + /** * 更新模块信息 *