| 1017 | { |
| 1018 | FEditorTool* Tool = ToolsPendingDestroy.Peek(); |
| 1019 | ToolsPendingDestroy.Pop(); |
| 1020 | |
| 1021 | // Deleting an asset queues its tool and the lost-asset check can queue it again the same frame. |
| 1022 | if (Algo::Find(EditorTools, Tool) == EditorTools.end()) |
| 1023 | { |
| 1024 | continue; |
| 1025 | } |
| 1026 | |
| 1027 | DestroyTool(UpdateContext, Tool); |
| 1028 | } |
| 1029 | |
| 1030 | AddPendingTools(); |
| 1031 | |
| 1032 | DrawFooterDrawer(UpdateContext); |
| 1033 | |
| 1034 | ModalManager.DrawDialogue(); |
| 1035 | |
| 1036 | // FEditorModalManager rejects CreateDialogue while a modal is active, so chains defer a frame. |
| 1037 | if (PendingDialogAction && !ModalManager.HasModal()) |
| 1038 | { |
| 1039 | TFunction<void()> Action = std::move(PendingDialogAction); |
| 1040 | PendingDialogAction = nullptr; |
| 1041 | Action(); |
| 1042 | } |
| 1043 | |
| 1044 | // A standalone launch waiting on its build finishes here, on the thread that may spawn it. |
| 1045 | StandaloneLauncher.Tick(); |
| 1046 | |
| 1047 | // The registry has to be populated before a GUID resolves, and focus wants a live ImGui frame. |
| 1048 | if (bSessionRestorePending) |
| 1049 | { |
| 1050 | bSessionRestorePending = false; |
| 1051 | RestoreSessionTabs(); |
| 1052 | } |
| 1053 | |
| 1054 | // Save All is global, unlike Ctrl+S, so handling it per-tool would fire it once per open tool. |
| 1055 | if (ImGui::GetIO().KeyCtrl && ImGui::GetIO().KeyShift && ImGui::IsKeyPressed(ImGuiKey_S, false)) |
| 1056 | { |
| 1057 | SaveAllDirtyPackages(); |
| 1058 | } |
| 1059 | |
| 1060 | // Gated on no active text input so it cannot fire out of a rename field or a search box. |
| 1061 | // The code workspace takes Ctrl+P for its own quick open while it has focus. |
| 1062 | const bool bCodeFocused = LastActiveTool != nullptr && LastActiveTool->GetUniqueTypeID() == FCodeWorkspaceTool::s_toolTypeID; |
| 1063 | if (ImGui::GetIO().KeyCtrl && !ImGui::GetIO().KeyShift && !ImGui::GetIO().WantTextInput && !bCodeFocused |
| 1064 | && ImGui::IsKeyPressed(ImGuiKey_P, false)) |
| 1065 | { |
| 1066 | OpenAssetSearchModal(); |
| 1067 | } |
| 1068 | |
| 1069 | // Rebindable in Editor Settings, and the code workspace runs its own reload binding while it has focus. |
| 1070 | if (!bCodeFocused && ImGuiX::IsShortcutPressed(GetDefault<CEditorSettings>()->ReloadScriptsHotkey, 0, ImGuiInputFlags_RouteGlobal)) |
| 1071 | { |
| 1072 | DotNet::RequestScriptReload(); |
| 1073 | } |
nothing calls this directly
no test coverage detected