mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
SL: Propagate profile SL to point and fix SL id cnt.
This commit is contained in:
1 parent
d3edf9e5c3
commit
550d86683d
2 files changed
+8
No files matched your search
@@ -15,10 +15,16 @@ class Point(object):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def sl(self):
|
def sl(self):
|
||||||
|
if self._sl is None:
|
||||||
|
return self._profile.sl
|
||||||
|
|
||||||
return self._sl
|
return self._sl
|
||||||
|
|
||||||
@sl.setter
|
@sl.setter
|
||||||
def sl(self, sl):
|
def sl(self, sl):
|
||||||
|
if sl == self._profile.sl:
|
||||||
|
self._sl = None
|
||||||
|
|
||||||
self._sl = sl
|
self._sl = sl
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|||||||
@@ -135,6 +135,8 @@ class SedimentLayer(SQLSubModel):
|
|||||||
else:
|
else:
|
||||||
self.id = id
|
self.id = id
|
||||||
|
|
||||||
|
SedimentLayer._id_cnt = max(id, SedimentLayer._id_cnt+1)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return f"{self.name} ({len(self)}) - {self.comment}"
|
return f"{self.name} ({len(self)}) - {self.comment}"
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user