From 1a66188411ee5f7e3978a39b399cc2fdd4958e6b Mon Sep 17 00:00:00 2001
From: Pierre-Antoine Rouby <pierre-antoine.rouby@inrae.fr>
Date: Wed, 21 Feb 2024 10:49:47 +0100
Subject: [PATCH] HS: Minor fixes.

---
 src/View/HydraulicStructures/PlotAC.py  | 3 +++
 src/View/HydraulicStructures/PlotKPC.py | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/View/HydraulicStructures/PlotAC.py b/src/View/HydraulicStructures/PlotAC.py
index d8b81974..710b5af7 100644
--- a/src/View/HydraulicStructures/PlotAC.py
+++ b/src/View/HydraulicStructures/PlotAC.py
@@ -118,6 +118,9 @@ class PlotAC(PamhyrPlot):
 
         self.line_kp.set_data(x, z)
 
+    def clear(self):
+        self.update_clear()
+
     def update_clear(self):
         if self.line_kp is not None:
             self.line_kp.set_data([], [])
diff --git a/src/View/HydraulicStructures/PlotKPC.py b/src/View/HydraulicStructures/PlotKPC.py
index 961f0a81..a50c1cb4 100644
--- a/src/View/HydraulicStructures/PlotKPC.py
+++ b/src/View/HydraulicStructures/PlotKPC.py
@@ -147,7 +147,7 @@ class PlotKPC(PamhyrPlot):
 
     def clear(self):
         if self.profile is not None:
-            self.profile.set_data([], [])
+            self.profile[0].set_data([], [])
 
         if self.line_kp_zmin_zmax is not None:
             self.line_kp_zmin_zmax.remove()
-- 
GitLab