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 {