From 7d4078baa78630229ef1d47bb2fc61ffcdfb2944 Mon Sep 17 00:00:00 2001
From: Tor-Einar Skog <tor-einar.skog@nibio.no>
Date: Thu, 7 Apr 2022 10:45:25 +0200
Subject: [PATCH] Bugfix: Taking first picture now works (it's rendered)

---
 src/components/Observation.vue                  | 1 +
 src/components/ObservationIllustrationBoard.vue | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/components/Observation.vue b/src/components/Observation.vue
index 3f44164..159655f 100644
--- a/src/components/Observation.vue
+++ b/src/components/Observation.vue
@@ -757,6 +757,7 @@
 					this.observation.observationId = newObservationId;
 					this.observation.observationData = '';
 					this.getNewObservation();
+					this.observation.observationIllustrationSet = [];
 				}
 				else {
 					this.$router.push('/cropCategory');
diff --git a/src/components/ObservationIllustrationBoard.vue b/src/components/ObservationIllustrationBoard.vue
index b35a16d..aba5870 100644
--- a/src/components/ObservationIllustrationBoard.vue
+++ b/src/components/ObservationIllustrationBoard.vue
@@ -166,6 +166,7 @@
 								}
 								// Add the component to the ObservationIllustrationBoard
 								this.observationIllustrations.push(newObservationIllustration);
+								this.organizeIllustrationsForRendering(); // Need to do this to ensure the first image is rendered
 								this.$emit("observationIllustrationSetUpdated", this.observationIllustrations);
 							};
 						};
-- 
GitLab