mirror of https://gitlab.com/pamhyr/pamhyr2
Mainwindow: Display debug in main window title.
parent
0c0ac93061
commit
1fc8540bf8
|
|
@ -131,10 +131,14 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
|||
self.dialog_reopen_study()
|
||||
|
||||
def set_title(self):
|
||||
title = "(dbg) " if self.conf.debug else ""
|
||||
|
||||
if self.model is not None:
|
||||
self.setWindowTitle(f"PAMHYR - {self.model.name}")
|
||||
title += f"PAMHYR - {self.model.name}"
|
||||
self.setWindowTitle(title)
|
||||
else:
|
||||
self.setWindowTitle("PAMHYR")
|
||||
title += "PAMHYR"
|
||||
self.setWindowTitle(title)
|
||||
|
||||
def enable_actions(self, action:str, enable:bool):
|
||||
"""Enable of disable an action componant
|
||||
|
|
@ -255,9 +259,9 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
|||
logger.setLevel(logging.INFO)
|
||||
logger.info("Set logging level to INFO")
|
||||
|
||||
|
||||
def setup_debug_mode(self, init = False):
|
||||
menu = self.findChild(QMenu, "menu_help")
|
||||
self.set_title()
|
||||
|
||||
if init:
|
||||
self.debug_action = QAction("Debug", self)
|
||||
|
|
|
|||
Loading…
Reference in New Issue