mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
merge
This commit is contained in:
commit
bd6e200a70
83 files changed
+1340
-5142
No files matched your search
+15
-23
@@ -177,10 +177,10 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
title = "(dbg) " if self.conf.debug else ""
|
||||
|
||||
if self._study is not None:
|
||||
title += f"Pamhyr2 - {self._study.name}"
|
||||
title += f"Pamhyr2 (Tahiti 🌴) - {self._study.name}"
|
||||
self.setWindowTitle(title)
|
||||
else:
|
||||
title += "Pamhyr2"
|
||||
title += "Pamhyr2 (Tahiti 🌴)"
|
||||
self.setWindowTitle(title)
|
||||
|
||||
def setup_tab(self):
|
||||
@@ -512,6 +512,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()
|
||||
@@ -761,15 +764,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)
|
||||
@@ -809,9 +813,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
|
||||
|
||||
@@ -823,7 +827,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
|
||||
@@ -1599,15 +1603,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