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
|
@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}"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue