Fixing Thumbnails preview from TableView
This commit is contained in:
+3
-1
@@ -95,7 +95,9 @@ namespace AzToolsFramework
|
||||
for (int i = 0; i < rows; ++i)
|
||||
{
|
||||
QModelIndex index = model->index(i, 0, parent);
|
||||
if (!model->hasChildren(index))
|
||||
AssetBrowserEntry* entry = GetAssetEntry(m_filterModel->mapToSource(index));
|
||||
//We only wanna see the source assets.
|
||||
if (entry->GetEntryType() == AssetBrowserEntry::AssetEntryType::Source)
|
||||
{
|
||||
beginInsertRows(parent, row, row);
|
||||
m_indexMap[row] = index;
|
||||
|
||||
+1
-6
@@ -100,16 +100,11 @@ namespace AzToolsFramework
|
||||
|
||||
AZStd::vector<AssetBrowserEntry*> AssetBrowserTreeView::GetSelectedAssets() const
|
||||
{
|
||||
|
||||
const QModelIndexList& selectedIndexes = selectionModel()->selectedRows();
|
||||
QModelIndexList sourceIndexes;
|
||||
for (const auto& index : selectedIndexes)
|
||||
{
|
||||
//If we check for more than one column then the model will try to select the same entry several times.
|
||||
if (index.column() == 0)
|
||||
{
|
||||
sourceIndexes.push_back(m_assetBrowserSortFilterProxyModel->mapToSource(index));
|
||||
}
|
||||
sourceIndexes.push_back(m_assetBrowserSortFilterProxyModel->mapToSource(index));
|
||||
}
|
||||
|
||||
AZStd::vector<AssetBrowserEntry*> entries;
|
||||
|
||||
Reference in New Issue
Block a user