mirror of https://gitlab.com/pamhyr/pamhyr2
Results with disabled profiles: fix a bug happening when we are looking at results, and we modify enable/disable some profiles at the same time. Now the plot uses the profiles stored with the results, and no more in the model
parent
8d2c18b6af
commit
0a0c00d877
|
|
@ -76,10 +76,13 @@ class PlotRKC(PamhyrPlot):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def reach_geometry(reach):
|
def reach_geometry(reach):
|
||||||
"""Return geometry values for profiles present in the results."""
|
"""Return geometry values for profiles present in the results."""
|
||||||
|
# The study's enabled profiles can change after a calculation. Keep
|
||||||
|
# coordinates in the same order as the result profiles and columns.
|
||||||
|
profiles = reach.profiles
|
||||||
return (
|
return (
|
||||||
reach.geometry.get_rk_enabled_profiles(),
|
[profile.rk for profile in profiles],
|
||||||
reach.geometry.get_z_min_enabled_profiles(),
|
[profile.geometry.z_min() for profile in profiles],
|
||||||
reach.geometry.get_z_max_enabled_profiles()
|
[profile.geometry.z_max() for profile in profiles],
|
||||||
)
|
)
|
||||||
|
|
||||||
@timer
|
@timer
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue