From ebc3e938bfa94f7f33ea1120a37a7282f04a829f Mon Sep 17 00:00:00 2001
From: Pierre-Antoine Rouby <pierre-antoine.rouby@inrae.fr>
Date: Tue, 20 Feb 2024 10:36:18 +0100
Subject: [PATCH] Results: Fix KPC update where no sediment.

---
 src/View/Results/PlotKPC.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/View/Results/PlotKPC.py b/src/View/Results/PlotKPC.py
index 7ccffc10..f7c071a4 100644
--- a/src/View/Results/PlotKPC.py
+++ b/src/View/Results/PlotKPC.py
@@ -348,7 +348,9 @@ class PlotKPC(PamhyrPlot):
         if not self._init:
             self.draw()
 
-        self.update_bottom_with_bedload()
+        if reach.has_sediment():
+            self.update_bottom_with_bedload()
+
         self.update_water_elevation()
 
         self.update_idle()
-- 
GitLab