summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorleo2005-11-20 01:30:52 +0000
committerleo2005-11-20 01:30:52 +0000
commitf474fa287cc0ce8be750fecb7c0100a3cf98d6d1 (patch)
treeeda3a541f7cedc95b8a5ba907092bf6ad43f91ca /common
parent0595320e3e0f52752c51a8e1064b042807469b52 (diff)
Pieces search results do not group pieces anymore.
git-svn-id: http://svn.leocad.org/trunk@441 c7d43263-9d01-0410-8a33-9dba5d9f93d6
Diffstat (limited to 'common')
-rwxr-xr-xcommon/library.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/common/library.cpp b/common/library.cpp
index eb2c48b..dfc7619 100755
--- a/common/library.cpp
+++ b/common/library.cpp
@@ -400,6 +400,8 @@ void PiecesLibrary::GetCategoryEntries(int CategoryIndex, PtrArray<PieceInfo>& S
String Keywords = m_Categories[CategoryIndex].Keywords;
Keywords.MakeLower();
+ bool SearchResults = (m_Categories[CategoryIndex].Name == "Search Results");
+
for (int i = 0; i < m_nPieceCount; i++)
{
PieceInfo* Info = &m_pPieceIdx[i];
@@ -441,18 +443,22 @@ void PiecesLibrary::GetCategoryEntries(int CategoryIndex, PtrArray<PieceInfo>& S
// Check if it's a patterned piece.
const char* Name = Info->m_strName;
- while (*Name)
+
+ if (!SearchResults)
{
- if (!*Name || *Name < '0' || *Name > '9')
- break;
+ while (*Name)
+ {
+ if (!*Name || *Name < '0' || *Name > '9')
+ break;
- if (*Name == 'P')
- break;
+ if (*Name == 'P')
+ break;
- Name++;
+ Name++;
+ }
}
- if (*Name == 'P')
+ if (*Name == 'P' && !SearchResults)
{
PieceInfo* Parent;