mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Reach sediments: avoid crash when trying to open Edit_reach_sediment_layer without any reach selected
This commit is contained in:
1 parent
8e3d784e92
commit
6175e8a03e
3 files changed
+11
-29
No files matched your search
@@ -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(
|
||||
|
||||
Reference in new issue
Block a user