Commit 17bce9a2 authored by Pierre-Antoine Rouby's avatar Pierre-Antoine Rouby
Browse files

IC: Fix window title name.

Showing with 14 additions and 7 deletions
+14 -7
...@@ -39,22 +39,29 @@ _translate = QCoreApplication.translate ...@@ -39,22 +39,29 @@ _translate = QCoreApplication.translate
class InitialConditionsWindow(ASubMainWindow, ListedSubWindow): class InitialConditionsWindow(ASubMainWindow, ListedSubWindow):
def __init__(self, title="Initial condition", def __init__(self, title="Initial condition",
study=None, parent=None): study=None, parent=None):
title = title + " - " + study.name
super(InitialConditionsWindow, self).__init__(
name=title, ui="InitialConditions", parent=parent
)
self._study = study self._study = study
self._reach = study.river.current_reach() self._reach = study.river.current_reach()
self._ics = self._study.river.initial_conditions.get(self._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_sc()
self.setup_table() self.setup_table()
self.setup_graph() self.setup_graph()
self.setup_connections() 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): def setup_sc(self):
self._undo_stack = QUndoStack() self._undo_stack = QUndoStack()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment