IC: Fix window title name.

mesh
Pierre-Antoine Rouby 2023-05-31 10:50:26 +02:00
parent e9af963c4b
commit 17bce9a22a
1 changed files with 14 additions and 7 deletions

View File

@ -39,22 +39,29 @@ _translate = QCoreApplication.translate
class InitialConditionsWindow(ASubMainWindow, ListedSubWindow):
def __init__(self, title="Initial condition",
study=None, parent=None):
title = title + " - " + study.name
super(InitialConditionsWindow, self).__init__(
name=title, ui="InitialConditions", parent=parent
)
self._study = study
self._reach = study.river.current_reach()
self._ics = self._study.river.initial_conditions.get(self._reach)
self.setup_title(title)
super(InitialConditionsWindow, self).__init__(
name=self._title, ui="InitialConditions", parent=parent
)
self.setup_sc()
self.setup_table()
self.setup_graph()
self.setup_connections()
self.ui.setWindowTitle(title)
self.ui.setWindowTitle(self._title)
def setup_title(self, title):
self._title = (
title + " - "
+ self._study.name + " - "
+ self._reach.name
)
def setup_sc(self):
self._undo_stack = QUndoStack()