mirror of https://gitlab.com/pamhyr/pamhyr2
SL: Propagate profile SL to point and fix SL id cnt.
parent
d3edf9e5c3
commit
550d86683d
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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}"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue