From 48a199867906fc1b586604bc47ca8cf8bbefaab8 Mon Sep 17 00:00:00 2001 From: Daan Vanden Bosch Date: Wed, 14 Aug 2019 18:55:05 +0200 Subject: [PATCH] Fixed bug in area geometry loading code. --- src/quest_editor/rendering/QuestModelManager.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/quest_editor/rendering/QuestModelManager.ts b/src/quest_editor/rendering/QuestModelManager.ts index e1e553eb..c2f51c09 100644 --- a/src/quest_editor/rendering/QuestModelManager.ts +++ b/src/quest_editor/rendering/QuestModelManager.ts @@ -15,6 +15,7 @@ import { ObservableQuest } from "../domain/ObservableQuest"; import { ObservableArea } from "../domain/ObservableArea"; import { ObservableAreaVariant } from "../domain/ObservableAreaVariant"; import { ObservableQuestEntity } from "../domain/observable_quest_entities"; +import { area_store } from "../stores/AreaStore"; const logger = Logger.get("rendering/QuestModelManager"); @@ -34,7 +35,9 @@ export class QuestModelManager { let area_variant: ObservableAreaVariant | undefined; if (quest && area) { - area_variant = quest.area_variants.find(v => v.area.id === area.id); + area_variant = + quest.area_variants.find(v => v.area.id === area.id) || + area_store.get_variant(quest.episode, area.id, 0); } if (this.quest === quest && this.area_variant === area_variant) {