mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Merge branch 'master' into scenarios.
This commit is contained in:
commit
40d90424a3
44 files changed
+1445
-562
No files matched your search
+13
-21
@@ -499,6 +499,9 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
self.update()
|
||||
|
||||
def close_model(self):
|
||||
if not self.dialog_close(cancel=True):
|
||||
return
|
||||
|
||||
self._study = None
|
||||
self.update_enable_action()
|
||||
self.conf.set_close_correctly()
|
||||
@@ -748,15 +751,16 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
##################
|
||||
|
||||
def msg_select_reach(self):
|
||||
self.message_box("Please select a reach",
|
||||
"Geometry edition need a reach selected "
|
||||
"into river network window to work on it")
|
||||
self.message_box(
|
||||
self._trad["mb_select_reach_title"],
|
||||
self._trad["mb_select_reach_msg"]
|
||||
)
|
||||
|
||||
def dialog_reopen_study(self):
|
||||
dlg = QMessageBox(self)
|
||||
|
||||
dlg.setWindowTitle("Last open study")
|
||||
dlg.setText("Do you want to open again the last open study?")
|
||||
dlg.setWindowTitle(self._trad["mb_last_open_title"])
|
||||
dlg.setText(self._trad["mb_last_open_msg"])
|
||||
opt = QMessageBox.Cancel | QMessageBox.Ok # | QMessageBox.Open
|
||||
|
||||
dlg.setStandardButtons(opt)
|
||||
@@ -796,9 +800,9 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
def dialog_close(self, cancel=True):
|
||||
dlg = QMessageBox(self)
|
||||
|
||||
dlg.setWindowTitle("Close PAMHYR without saving study")
|
||||
dlg.setText("Do you want to save current study before PAMHYR close ?")
|
||||
opt = QMessageBox.Save | QMessageBox.Ignore
|
||||
dlg.setWindowTitle(self._trad["mb_close_title"])
|
||||
dlg.setText(self._trad["mb_close_msg"])
|
||||
opt = QMessageBox.Save | QMessageBox.Close
|
||||
if cancel:
|
||||
opt |= QMessageBox.Cancel
|
||||
|
||||
@@ -810,7 +814,7 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
if res == QMessageBox.Save:
|
||||
self.save_study()
|
||||
return True
|
||||
elif res == QMessageBox.Ignore:
|
||||
elif res == QMessageBox.Close:
|
||||
return True
|
||||
elif res == QMessageBox.Cancel:
|
||||
return False
|
||||
@@ -1446,15 +1450,3 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
f"sqlitebrowser {file}",
|
||||
shell=True
|
||||
)
|
||||
|
||||
# TODO: Delete me !
|
||||
###############
|
||||
# DUMMY STUFF #
|
||||
###############
|
||||
|
||||
def open_dummy(self, title="Dummy"):
|
||||
self.dummy = DummyWindow(
|
||||
title=title if type(title) is str else "Dummy",
|
||||
parent=self
|
||||
)
|
||||
self.dummy.show()
|
||||
Reference in new issue
Block a user