Reach sediments: avoid crash when trying to open Edit_reach_sediment_layer without any reach selected

This commit is contained in:
Dylan Jeannin committed 2026-07-23 15:39:07 +02:00
1 parent 8e3d784e92
commit 6175e8a03e
3 files changed
+11 -29

No files matched your search

+10
View File
@@ -1525,6 +1525,16 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
sl.show()
def open_reach_sediment_layers(self):
if self._study is None:
logger.debug(
"No study open for reach sediment layers edition..."
)
return
if not self._study.river.has_current_reach():
self.msg_select_reach()
return
reach = self._study.river.current_reach().reach
if self.sub_window_exists(