SL: Propagate profile SL to point and fix SL id cnt.

mesh
Pierre-Antoine Rouby 2023-07-24 17:55:51 +02:00
parent d3edf9e5c3
commit 550d86683d
2 changed files with 8 additions and 0 deletions

View File

@ -15,10 +15,16 @@ class Point(object):
@property
def sl(self):
if self._sl is None:
return self._profile.sl
return self._sl
@sl.setter
def sl(self, sl):
if sl == self._profile.sl:
self._sl = None
self._sl = sl
@property

View File

@ -135,6 +135,8 @@ class SedimentLayer(SQLSubModel):
else:
self.id = id
SedimentLayer._id_cnt = max(id, SedimentLayer._id_cnt+1)
def __str__(self):
return f"{self.name} ({len(self)}) - {self.comment}"