diff --git a/src/View/Results/Window.py b/src/View/Results/Window.py index f154eb3db9e5c4eab6596f41bb5344e65bd9ef3f..45aaa0094ced68d59565ed910cbe434e3747721b 100644 --- a/src/View/Results/Window.py +++ b/src/View/Results/Window.py @@ -614,12 +614,11 @@ class ResultsWindow(PamhyrWindow): quotechar='|', quoting=csv.QUOTE_MINIMAL) writer.writerow(["timestamp", "z", "q"]) - for profile in reach.profiles: - timestamps = self._results.get("timestamps") - - for ts in timestamps: - writer.writerow([ - ts, - profile.get_ts_key(ts, "Z"), - profile.get_ts_key(ts, "Q"), - ]) + timestamps = sorted(self._results.get("timestamps")) + + for ts in timestamps: + writer.writerow([ + ts, + profile.get_ts_key(ts, "Z"), + profile.get_ts_key(ts, "Q"), + ])