Move the initialization of m_editorEntityUiInterface higher so that it's initialized when the interface is set up. (#4972)

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
monroegm-disable-blank-issue-2
Danilo Aimini 4 years ago committed by GitHub
parent a5694a5ac6
commit 3b4b8c3549
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -153,6 +153,9 @@ namespace AzToolsFramework
{ {
initEntityOutlinerWidgetResources(); initEntityOutlinerWidgetResources();
m_editorEntityUiInterface = AZ::Interface<AzToolsFramework::EditorEntityUiInterface>::Get();
AZ_Assert(m_editorEntityUiInterface != nullptr, "EntityOutlinerWidget requires a EditorEntityUiInterface instance on Initialize.");
m_gui = new Ui::EntityOutlinerWidgetUI(); m_gui = new Ui::EntityOutlinerWidgetUI();
m_gui->setupUi(this); m_gui->setupUi(this);
@ -282,12 +285,6 @@ namespace AzToolsFramework
m_listModel->Initialize(); m_listModel->Initialize();
m_editorEntityUiInterface = AZ::Interface<AzToolsFramework::EditorEntityUiInterface>::Get();
AZ_Assert(
m_editorEntityUiInterface != nullptr,
"EntityOutlinerWidget requires a EditorEntityUiInterface instance on Initialize.");
EditorPickModeNotificationBus::Handler::BusConnect(GetEntityContextId()); EditorPickModeNotificationBus::Handler::BusConnect(GetEntityContextId());
EntityHighlightMessages::Bus::Handler::BusConnect(); EntityHighlightMessages::Bus::Handler::BusConnect();
EntityOutlinerModelNotificationBus::Handler::BusConnect(); EntityOutlinerModelNotificationBus::Handler::BusConnect();

Loading…
Cancel
Save