From 935226a17e0c3ad4d81e2732e879770af60699d4 Mon Sep 17 00:00:00 2001
From: Emmanuel Raviart <emmanuel@raviart.com>
Date: Wed, 22 Jan 2025 16:49:27 +0100
Subject: [PATCH] =?UTF-8?q?Ne=20fusionne=20pas=20les=20cas=20types=20quand?=
 =?UTF-8?q?=20on=20change=20de=20cas=20type=20alors=20que=20les=20courbes?=
 =?UTF-8?q?=20sont=20affich=C3=A9es?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/lib/components/WaterfallView.svelte | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/lib/components/WaterfallView.svelte b/src/lib/components/WaterfallView.svelte
index bc5f23c44..8093956a2 100644
--- a/src/lib/components/WaterfallView.svelte
+++ b/src/lib/components/WaterfallView.svelte
@@ -197,6 +197,14 @@
   }
 
   function requestAxesCalculation() {
+    // Ensure that situation of previous curve is not merged with the new one.
+    if (
+      shared.savedSituation !== undefined &&
+      shared.savedSituationIndex !== undefined
+    ) {
+      shared.testCases[shared.savedSituationIndex] = shared.savedSituation
+    }
+
     shared.savedSituation = situation
     shared.savedSituationIndex = situationIndex
     situation = structuredClone($state.snapshot(situation))
-- 
GitLab