SL: Fix move down exception.

This commit is contained in:
Pierre-Antoine Rouby committed 2023-07-26 13:27:18 +02:00
1 parent a9b905a039
commit 003be29eca
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -284,7 +284,7 @@ class SedimentLayer(SQLSubModel):
self.delete(els)
def move_up(self, index):
if index < len(self._layers):
if index >= 0:
next = index - 1
l = self._layers
@@ -293,7 +293,7 @@ class SedimentLayer(SQLSubModel):
self._status.modified()
def move_down(self, index):
if index >= 0:
if index + 1 < len(self._layers):
prev = index + 1
l = self._layers