From f474fa287cc0ce8be750fecb7c0100a3cf98d6d1 Mon Sep 17 00:00:00 2001 From: leo Date: Sun, 20 Nov 2005 01:30:52 +0000 Subject: Pieces search results do not group pieces anymore. git-svn-id: http://svn.leocad.org/trunk@441 c7d43263-9d01-0410-8a33-9dba5d9f93d6 --- common/library.cpp | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'common') 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& 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& 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; -- cgit v1.2.3