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

Pamhyr: Add recursive window activation.

Showing with 17 additions and 3 deletions
+17 -3
......@@ -573,9 +573,23 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
#############
def _activate_window(self, window_hash):
window = self.get_sub_win(window_hash)
if window is not None:
window.activateWindow()
self._try_activate_window_for_window(self, window_hash)
def _try_activate_window_for_window(self,
source_window,
window_hash):
try:
window = source_window.get_sub_win(window_hash)
if window is not None:
window.activateWindow()
else:
for _, win in source_window.sub_win_list:
self._try_activate_window_for_window(
win,
window_hash
)
except Exception:
return
def _update_window_list(self):
self._propagation_keys.add("window_list")
......
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