SL: Minor fixes.

This commit is contained in:
Pierre-Antoine Rouby committed 2023-07-25 16:53:37 +02:00
1 parent b0810f6eed
commit bccbc41fe8
2 files changed
+9 -1

No files matched your search

+6 -1
View File
@@ -143,7 +143,12 @@ class SedimentLayer(SQLSubModel):
SedimentLayer._id_cnt = max(id, SedimentLayer._id_cnt+1)
def __str__(self):
return f"{self.name} ({len(self)}) - {self.comment}"
s = f"{self.name} ({len(self)})"
if self.comment != "":
s += f" - {self.comment}"
return s
def __len__(self):
return len(self._layers)