Browse Source

Undoing temporary asset browser filter changes

Signed-off-by: Guthrie Adams <[email protected]>
Guthrie Adams 1 year ago
parent
commit
9d4488f667

+ 4 - 5
Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetBrowserFilterModel.cpp

@@ -122,11 +122,7 @@ namespace AzToolsFramework
             else if (role == static_cast<int>(AzQtComponents::AssetFolderThumbnailView::Role::IsExactMatch))
             {
                 auto entry = static_cast<AssetBrowserEntry*>(mapToSource(index).internalPointer());
-                if (!m_filter)
-                {
-                    return true;
-                }
-                return m_filter->MatchWithoutPropagation(entry);
+                return m_filter && m_filter->MatchWithoutPropagation(entry);
             }
 
             return QSortFilterProxyModel::data(index, role);
@@ -145,10 +141,12 @@ namespace AzToolsFramework
             {
                 idx = static_cast<AssetBrowserTreeToTableProxyModel*>(sourceModel())->mapToSource(idx);
             }
+
             if (!idx.isValid())
             {
                 return false;
             }
+
             // no filter present, every entry is visible
             if (!m_filter)
             {
@@ -163,6 +161,7 @@ namespace AzToolsFramework
             {
                 return true;
             }
+
             return m_filter->MatchWithoutPropagation(entry);
         }
 

+ 12 - 4
Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Search/Filter.cpp

@@ -64,8 +64,12 @@ namespace AzToolsFramework
                 entry->VisitUp(
                     [&result, this](const auto& currentEntry)
                     {
-                        result = result || MatchInternal(currentEntry);
-                        return !result;
+                        if (MatchInternal(currentEntry))
+                        {
+                            result = true;
+                            return false;
+                        }
+                        return true;
                     });
 
                 if (result)
@@ -80,8 +84,12 @@ namespace AzToolsFramework
                 entry->VisitDown(
                     [&](const auto& currentEntry)
                     {
-                        result = result || MatchInternal(currentEntry);
-                        return !result;
+                        if (MatchInternal(currentEntry))
+                        {
+                            result = true;
+                            return false;
+                        }
+                        return true;
                     });
 
                 if (result)

+ 0 - 15
README.md

@@ -5,21 +5,6 @@ O3DE (Open 3D Engine) is an open-source, real-time, multi-platform 3D engine tha
 ## Contribute
 For information about contributing to Open 3D Engine, visit [https://o3de.org/docs/contributing/](https://o3de.org/docs/contributing/).
 
-## Updates to this readme
-July 06, 2021
-- Switch licenses to APACHE-2.0 OR MIT
-
-May 14, 2021 
-- Removed instructions for the 3rdParty zip file and downloader URL. This is no longer a requirement. 
-- Updated instructions for dependencies
-- Links to full documentation
-
-April 7-13, 2021
-- Updates to the 3rdParty zip file
-
-March 25, 2021
-- Initial commit for instructions
-
 ## Download and Install
 
 This repository uses Git LFS for storing large binary files.