Merge branch 'main' into hultonha_LYN-2315_camera-phase-2

This commit is contained in:
hultonha
2021-04-28 17:29:24 +01:00
88 changed files with 389 additions and 281 deletions
+4 -4
View File
@@ -1509,10 +1509,10 @@ bool EditorViewportWidget::AddCameraMenuItems(QMenu* menu)
}
action = customCameraMenu->addAction(tr("Look through entity"));
AzToolsFramework::EntityIdList selectedEntityList;
AzToolsFramework::ToolsApplicationRequests::Bus::BroadcastResult(selectedEntityList, &AzToolsFramework::ToolsApplicationRequests::GetSelectedEntities);
action->setCheckable(selectedEntityList.size() > 0 || m_viewSourceType == ViewSourceType::AZ_Entity);
action->setEnabled(selectedEntityList.size() > 0 || m_viewSourceType == ViewSourceType::AZ_Entity);
bool areAnyEntitiesSelected = false;
AzToolsFramework::ToolsApplicationRequestBus::BroadcastResult(areAnyEntitiesSelected, &AzToolsFramework::ToolsApplicationRequests::AreAnyEntitiesSelected);
action->setCheckable(areAnyEntitiesSelected || m_viewSourceType == ViewSourceType::AZ_Entity);
action->setEnabled(areAnyEntitiesSelected || m_viewSourceType == ViewSourceType::AZ_Entity);
action->setChecked(m_viewSourceType == ViewSourceType::AZ_Entity);
connect(action, &QAction::triggered, this, [this](bool isChecked)
{