Fixed bug that would allow you to modify events while debugging after switching areas.

This commit is contained in:
Daan Vanden Bosch 2020-07-31 21:08:49 +02:00
parent 329ca0e539
commit f1d9f715cb
2 changed files with 4 additions and 4 deletions

View File

@ -24,10 +24,8 @@ export class EventSubGraphView extends View {
/**
* Maps event IDs to GUI data.
*/
private readonly event_gui_data: Map<
QuestEventModel,
{ event_view: EventView; position: number }
> = new Map();
private readonly event_gui_data: Map<QuestEventModel,
{ event_view: EventView; position: number }> = new Map();
private readonly event_container_element = div({
className: "quest_editor_EventSubGraphView_event_container",
@ -181,6 +179,7 @@ export class EventSubGraphView extends View {
const disposer = new Disposer();
const event_view = disposer.add(new EventView(this.ctrl, event));
event_view.enabled.val = this.enabled.val;
this.event_gui_data.set(event, {
event_view,

View File

@ -120,6 +120,7 @@ export class EventsView extends ResizableView {
sub_graph,
this.max_edge_depth,
);
sub_graph_view.enabled.val = this.enabled.val;
this.sub_graph_views.set(sub_graph, sub_graph_view);
}