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

MainWindow: Info: Sync update with all modelling modules.

No related merge requests found
Pipeline #55415 passed with stages
in 3 minutes and 26 seconds
Showing with 13 additions and 2 deletions
+13 -2
...@@ -448,8 +448,7 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit): ...@@ -448,8 +448,7 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
if Modules.CONFIG in keys: if Modules.CONFIG in keys:
self._do_update_config() self._do_update_config()
if Modules.STUDY in keys: self._do_propagate_update_info_tab(keys)
self._tab_widget_info.update()
logger.debug(f"Propagation of {keys}") logger.debug(f"Propagation of {keys}")
for _, window in self.sub_win_list: for _, window in self.sub_win_list:
...@@ -458,6 +457,18 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit): ...@@ -458,6 +457,18 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
self._tab_widget_checker.update(modules=keys) self._tab_widget_checker.update(modules=keys)
def _do_propagate_update_info_tab(self, keys):
modules = Modules.modelling_list()
modules.append(Modules.STUDY)
has_info_mod = reduce(
lambda acc, m: acc or (m in keys),
modules, False
)
if has_info_mod:
self._tab_widget_info.update()
def _do_propagate_update_rec(self, window, keys): def _do_propagate_update_rec(self, window, keys):
for _, win in window.sub_win_list: for _, win in window.sub_win_list:
win._propagated_update(key=keys) win._propagated_update(key=keys)
......
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