diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Application/AtomToolsApplication.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Application/AtomToolsApplication.cpp index a949852b5e..13b9a2ba27 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Application/AtomToolsApplication.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Application/AtomToolsApplication.cpp @@ -12,7 +12,6 @@ #include #include -#include #include #include #include @@ -183,8 +182,8 @@ namespace AtomToolsFramework LoadSettings(); - AtomToolsMainWindowFactoryRequestBus::Broadcast(&AtomToolsMainWindowFactoryRequestBus::Handler::CreateMainWindow); AtomToolsMainWindowNotificationBus::Handler::BusConnect(); + AtomToolsMainWindowFactoryRequestBus::Broadcast(&AtomToolsMainWindowFactoryRequestBus::Handler::CreateMainWindow); auto editorPythonEventsInterface = AZ::Interface::Get(); if (editorPythonEventsInterface) @@ -195,9 +194,9 @@ namespace AtomToolsFramework editorPythonEventsInterface->StartPython(); } - QTimer::singleShot(0, this, [this]() { - ProcessCommandLine(m_commandLine); - }); + // Delay execution of commands and scripts post initialization + QTimer::singleShot(0, [this]() { ProcessCommandLine(m_commandLine); }); + m_timer.start(); }