pamhyr: Fix #20 study reload whene study is not saved on a file.

setup.py
Pierre-Antoine Rouby 2023-11-21 09:26:57 +01:00
parent 9b53b4302b
commit 470eae8b92
2 changed files with 6 additions and 2 deletions

View File

@ -139,8 +139,9 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
self.trans = QTranslator(self) self.trans = QTranslator(self)
# self.ui.retranslateUi() # self.ui.retranslateUi()
if self.conf.last_study != "" and not self.conf.close_correctly: if not self.conf.close_correctly:
self.dialog_reopen_study() if self.conf.last_study != "":
self.dialog_reopen_study()
if _doc == "external": if _doc == "external":
logger.info("doc: Internal documentation is not available...") logger.info("doc: Internal documentation is not available...")

View File

@ -316,6 +316,9 @@ class Config(SQL):
self.commit() self.commit()
def set_last_study(self, filename): def set_last_study(self, filename):
if filename is None:
return
self.last_study = filename self.last_study = filename
self.close_correctly = False self.close_correctly = False
self.execute( self.execute(