mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Merge branch 'master' of gitlab-ssh.irstea.fr:theophile.terraz/pamhyr
This commit is contained in:
commit
ceaab3c2fc
2 files changed
+8
-6
No files matched your search
+7
-5
@@ -38,7 +38,11 @@ def mage_file_open(filepath, mode):
|
||||
|
||||
if "w" in mode:
|
||||
# Write header
|
||||
f.write("* This file is generated by PAMHYR, please don't modify\n")
|
||||
comment = "*"
|
||||
if ".ST" in filepath:
|
||||
comment = "#"
|
||||
|
||||
f.write(f"{comment} This file is generated by PAMHYR, please don't modify\n")
|
||||
|
||||
return f
|
||||
|
||||
@@ -1009,10 +1013,8 @@ class Mage8(Mage):
|
||||
# Set data for profile RI
|
||||
reach.set(ri, timestamp, key, d)
|
||||
if key == "Z":
|
||||
profile = study.river\
|
||||
.current_reach()\
|
||||
.reach.profile(ri)
|
||||
ptX, ptY = profile.get_water_limits(d)
|
||||
profile = reach.profile(ri)
|
||||
ptX, ptY = profile.geometry.get_water_limits(d)
|
||||
reach.set(ri, timestamp, "ptX", ptX)
|
||||
reach.set(ri, timestamp, "ptY", ptY)
|
||||
|
||||
|
||||
@@ -567,7 +567,7 @@ class GeometryWindow(PamhyrWindow):
|
||||
|
||||
def _export_to_file_st(self, filename):
|
||||
with open(filename, "w+") as f:
|
||||
f.write("* Exported from Pamhyr2\n")
|
||||
f.write("# Exported from Pamhyr2\n")
|
||||
self._export_to_file_st_reach(f, self._reach)
|
||||
|
||||
def _export_to_file_st_reach(self, wfile, reach):
|
||||
|
||||
Reference in new issue
Block a user