HS: Fix hs section set and display.

This commit is contained in:
parouby committed 2025-08-28 15:23:33 +02:00
1 parent fc7d732e0a
commit a072a28929
5 files changed
+10 -8

No files matched your search

+1 -1
View File
@@ -142,7 +142,7 @@ class PlotRKC(PamhyrPlot):
hs_color.append("red")
else:
hs_color.append("darkgrey")
x = hs.input_rk
x = hs.input_section.rk
if x is not None:
a = self.canvas.axes.annotate(
" > " + hs.name,
+1 -1
View File
@@ -103,7 +103,7 @@ class ComboBoxDelegate(QItemDelegate):
)
)
value = profiles[0].rk if len(profiles) > 0 else None
value = profiles[0] if len(profiles) > 0 else None
else:
value = text
+3 -3
View File
@@ -297,11 +297,11 @@ class HydraulicStructuresWindow(PamhyrWindow):
self.plot_rkc.set_reach(reach)
self.plot_ac.set_reach(reach)
profile_rk = self._hs_lst.get(rows[0]).input_rk
if profile_rk is not None:
profile = self._hs_lst.get(rows[0]).input_section
if profile is not None:
profiles = reach.reach\
.get_profiles_from_rk(
float(profile_rk)
float(profile.rk)
)
if len(profiles) != 0 and profiles is not None: