Reset Selected Gamesystem after Deletion
All checks were successful
E2E Testing / test (push) Successful in 1m31s

This commit is contained in:
Sebastian Böckelmann 2024-03-19 08:33:33 +01:00
parent 87368f4e65
commit 7e672ec117
2 changed files with 4 additions and 1 deletions

View File

@ -146,10 +146,12 @@ export class AppComponent implements OnInit{
} else { } else {
parentGamesystemName = this.gamesystemOverview!.selectedGamesystemName; parentGamesystemName = this.gamesystemOverview!.selectedGamesystemName;
} }
const createdGamesystem = this.gameModel!.createGamesystem("New Gamesystem", parentGamesystemName); const createdGamesystem = this.gameModel!.createGamesystem("New Gamesystem", parentGamesystemName);
if(createdGamesystem != undefined) { if(createdGamesystem != undefined) {
this.gamesystemOverview!.refresh(); this.gamesystemOverview!.refresh();
this.editor?.openGameModelComponent(createdGamesystem!); this.editor?.openGameModelComponent(createdGamesystem);
} }
} }

View File

@ -102,6 +102,7 @@ export class GamescriptOverviewComponent implements OnInit {
refresh() { refresh() {
this.dataSource.data = this.gameModel!.gamesystems; this.dataSource.data = this.gameModel!.gamesystems;
this.resetSelectedGamesystem()
} }
resetSelectedGamesystem() { resetSelectedGamesystem() {