Skip to content

Commit

Permalink
Merged gluon-oss/scenebuilder into default
Browse files Browse the repository at this point in the history
  • Loading branch information
Jose Pereda committed Nov 28, 2017
2 parents da4368a + 7253268 commit cd4395d
Showing 1 changed file with 16 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,8 @@ public void start(Stage stage) throws Exception {
*/
@Override
public void handleLaunch(List<String> files) {
boolean showWelcomeDialog = files.isEmpty();

setApplicationUncaughtExceptionHandler();

MavenPreferences mavenPreferences = PreferencesController.getSingleton().getMavenPreferences();
Expand All @@ -403,14 +405,19 @@ public void handleLaunch(List<String> files) {
}
}
if (shouldShowImportGluonJarAlert) {
SceneBuilderApp sceneBuilderApp = SceneBuilderApp.getSingleton();
DocumentWindowController dwc = sceneBuilderApp.getFrontDocumentWindow();
if (dwc == null) {
dwc = sceneBuilderApp.getDocumentWindowControllers().get(0);
}
ImportingGluonControlsAlert alert = new ImportingGluonControlsAlert(dwc.getStage());
AppSettings.setWindowIcon(alert);
alert.showAndWait();
Platform.runLater(() -> {
SceneBuilderApp sceneBuilderApp = SceneBuilderApp.getSingleton();
DocumentWindowController dwc = sceneBuilderApp.getFrontDocumentWindow();
if (dwc == null) {
dwc = sceneBuilderApp.getDocumentWindowControllers().get(0);
}
ImportingGluonControlsAlert alert = new ImportingGluonControlsAlert(dwc.getStage());
AppSettings.setWindowIcon(alert);
if (showWelcomeDialog) {
alert.initOwner(WelcomeDialogWindowController.getInstance().getStage());
}
alert.showAndWait();
});
}
updateImportedGluonJars(jarReports);
});
Expand All @@ -421,7 +428,7 @@ public void handleLaunch(List<String> files) {

sendTrackingStartupInfo();

if (files.isEmpty()) {
if (showWelcomeDialog) {
// Creates an empty document
final DocumentWindowController newWindow = makeNewWindow();
newWindow.updateWithDefaultContent();
Expand Down

0 comments on commit cd4395d

Please sign in to comment.