From d191c2850589aef9bb5927d2edbe1f54a8032807 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ckelmann?= Date: Sat, 10 Feb 2024 12:52:48 +0100 Subject: [PATCH] Delete SimpleTransitions --- .../simple-transition-editor.component.html | 2 +- .../simple-transition-editor.component.ts | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/app/editor/gamesystem-editor/transition-editor/simple-transition-editor/simple-transition-editor.component.html b/src/app/editor/gamesystem-editor/transition-editor/simple-transition-editor/simple-transition-editor.component.html index 57eab7d..1ad5505 100644 --- a/src/app/editor/gamesystem-editor/transition-editor/simple-transition-editor/simple-transition-editor.component.html +++ b/src/app/editor/gamesystem-editor/transition-editor/simple-transition-editor/simple-transition-editor.component.html @@ -51,7 +51,7 @@ - + diff --git a/src/app/editor/gamesystem-editor/transition-editor/simple-transition-editor/simple-transition-editor.component.ts b/src/app/editor/gamesystem-editor/transition-editor/simple-transition-editor/simple-transition-editor.component.ts index fe8f245..c1f64ee 100644 --- a/src/app/editor/gamesystem-editor/transition-editor/simple-transition-editor/simple-transition-editor.component.ts +++ b/src/app/editor/gamesystem-editor/transition-editor/simple-transition-editor/simple-transition-editor.component.ts @@ -76,4 +76,11 @@ export class SimpleTransitionEditorComponent implements OnInit { this.dataSource.data = this.gamesystem!.transitions; this.editedTransition = undefined; } + + deleteTransition(transition: SimpleTransition) { + if(this.gamesystem!.parentGamesystem == undefined) { + this.gamesystem!.removeTransition(transition); + this.dataSource.data = this.gamesystem!.transitions; + } + } }