From d346d458481a9b0aa5e963449c9ccb4d18b402b6 Mon Sep 17 00:00:00 2001 From: John Jones-Steele <82226755+jjjoness@users.noreply.github.com> Date: Tue, 25 Jan 2022 10:43:20 +0000 Subject: [PATCH] File menu open level and save level as dialogs not properly recognized as modals #6605 (#7072) * WIP Signed-off-by: John Jones-Steele <82226755+jjjoness@users.noreply.github.com> * Fixes to ModalWindowDismisser Signed-off-by: John Jones-Steele <82226755+jjjoness@users.noreply.github.com> * Redisables Import test as fails on Jenkins Signed-off-by: John Jones-Steele <82226755+jjjoness@users.noreply.github.com> * Redisables Import test and Edit Platform as fails on Jenkins Signed-off-by: John Jones-Steele <82226755+jjjoness@users.noreply.github.com> * Replace skip in TestSuite_Main.py Signed-off-by: John Jones-Steele <82226755+jjjoness@users.noreply.github.com> --- .../editor/EditorScripts/Menus_FileMenuOptions.py | 6 +++--- Code/Editor/Util/ModalWindowDismisser.cpp | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_FileMenuOptions.py b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_FileMenuOptions.py index 4fcdc371e7..0060a3b29a 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_FileMenuOptions.py +++ b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_FileMenuOptions.py @@ -32,10 +32,10 @@ def Menus_FileMenuOptions_Work(): file_menu_options = [ ("New Level",), - #("Open Level",), Temporarily disabled due to https://github.com/o3de/o3de/issues/6605 - #("Import",), Temporarily disabled due to https://github.com/o3de/o3de/issues/6746 + ("Open Level",), + #("Import",), #Temporarily disabled due to https://github.com/o3de/o3de/issues/6746 ("Save",), - #("Save As",), Temporarily disabled due to https://github.com/o3de/o3de/issues/6605 + ("Save As",), ("Save Level Statistics",), ("Edit Project Settings",), #("Edit Platform Settings",), Temporarily disabled due to https://github.com/o3de/o3de/issues/6604 diff --git a/Code/Editor/Util/ModalWindowDismisser.cpp b/Code/Editor/Util/ModalWindowDismisser.cpp index 7ae62e4a67..17bd1f8543 100644 --- a/Code/Editor/Util/ModalWindowDismisser.cpp +++ b/Code/Editor/Util/ModalWindowDismisser.cpp @@ -45,7 +45,8 @@ bool ModalWindowDismisser::eventFilter(QObject* object, QEvent* event) { if (dialog->isModal()) { - if (event->type() == QEvent::Show) + QEvent::Type test = event->type(); + if (test == QEvent::Show || test == QEvent::WindowActivate) { auto it = AZStd::find(m_windows.begin(), m_windows.end(), dialog); if (it == m_windows.end())