In Slice mode, don't instantiate the handler, and also hide and disable the breadcrumbs widgets.
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include "ViewportTitleDlg.h"
|
||||
|
||||
// Qt
|
||||
#include <QLabel>
|
||||
#include <QInputDialog>
|
||||
|
||||
#include <AtomLyIntegration/AtomViewportDisplayInfo/AtomViewportInfoDisplayBus.h>
|
||||
@@ -38,6 +39,7 @@
|
||||
|
||||
#include <AzCore/std/algorithm.h>
|
||||
#include <AzCore/Casting/numeric_cast.h>
|
||||
#include <AzFramework/API/ApplicationAPI.h>
|
||||
#include <AzToolsFramework/Viewport/ViewportMessages.h>
|
||||
|
||||
#include <LmbrCentral/Audio/AudioSystemComponentBus.h>
|
||||
@@ -145,6 +147,11 @@ CViewportTitleDlg::~CViewportTitleDlg()
|
||||
AZ::VR::VREventBus::Handler::BusDisconnect();
|
||||
GetISystem()->GetISystemEventDispatcher()->RemoveListener(this);
|
||||
GetIEditor()->UnregisterNotifyListener(this);
|
||||
|
||||
if (m_prefabViewportFocusPathHandler)
|
||||
{
|
||||
delete m_prefabViewportFocusPathHandler;
|
||||
}
|
||||
}
|
||||
|
||||
void CViewportTitleDlg::SetupCameraDropdownMenu()
|
||||
@@ -312,7 +319,22 @@ void CViewportTitleDlg::OnInitDialog()
|
||||
|
||||
m_cameraSpeed->setFixedWidth(width);
|
||||
|
||||
m_prefabViewportFocusPathHandler.Initialize(m_ui->m_prefabFocusPath, m_ui->m_prefabFocusBackButton);
|
||||
bool isPrefabSystemEnabled = false;
|
||||
AzFramework::ApplicationRequests::Bus::BroadcastResult(isPrefabSystemEnabled, &AzFramework::ApplicationRequests::IsPrefabSystemEnabled);
|
||||
|
||||
if (isPrefabSystemEnabled)
|
||||
{
|
||||
m_prefabViewportFocusPathHandler = new AzToolsFramework::Prefab::PrefabViewportFocusPathHandler();
|
||||
m_prefabViewportFocusPathHandler->Initialize(m_ui->m_prefabFocusPath, m_ui->m_prefabFocusBackButton);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_ui->m_prefabFocusPath->setEnabled(false);
|
||||
m_ui->m_prefabFocusBackButton->setEnabled(false);
|
||||
m_ui->m_prefabFocusPath->hide();
|
||||
m_ui->m_prefabFocusBackButton->hide();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -177,7 +177,7 @@ protected:
|
||||
QWidgetAction* m_gridSizeActionWidget = nullptr;
|
||||
QWidgetAction* m_angleSizeActionWidget = nullptr;
|
||||
|
||||
AzToolsFramework::Prefab::PrefabViewportFocusPathHandler m_prefabViewportFocusPathHandler;
|
||||
AzToolsFramework::Prefab::PrefabViewportFocusPathHandler* m_prefabViewportFocusPathHandler = nullptr;
|
||||
|
||||
QScopedPointer<Ui::ViewportTitleDlg> m_ui;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user