From 635da80bf2e71f9d260814d1864b1bf6fe0855f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ckelmann?= Date: Sat, 10 Feb 2024 10:12:28 +0100 Subject: [PATCH] Open Gamesystem Editor after Gamesystem Creation --- src/app/app.component.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index fd4ad28..43021e3 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -113,8 +113,11 @@ export class AppComponent implements OnInit{ } else { parentGamesystemName = this.gamesystemOverview!.selectedGamesystemName; } - this.gameModel!.createGamesystem("New Gamesystem", parentGamesystemName); - this.gamesystemOverview!.refresh(); + const createdGamesystem = this.gameModel!.createGamesystem("New Gamesystem", parentGamesystemName); + if(createdGamesystem != undefined) { + this.gamesystemOverview!.refresh(); + this.editor?.openGameModelComponent(createdGamesystem!); + } } private getSelectedModelComponent(): ModelComponent | undefined {