Added logic to AssetPickerDialog to pre-select by file paths.

Signed-off-by: Chris Galvan <chgalvan@amazon.com>
This commit is contained in:
Chris Galvan
2021-11-19 14:49:56 -06:00
committed by Chris Burel
parent d9ee02fddf
commit 42382cd8d1
@@ -99,6 +99,18 @@ namespace AzToolsFramework
}
}
if (selection.GetSelectedAssetIds().empty())
{
for (auto& filePath : selection.GetSelectedFilePaths())
{
if (!filePath.empty())
{
selectedAsset = true;
m_ui->m_assetBrowserTreeViewWidget->SelectFileAtPath(filePath);
}
}
}
if (!selectedAsset)
{
m_ui->m_assetBrowserTreeViewWidget->SelectFolder(selection.GetDefaultDirectory());