Only allow searching subcollections when using merged collections

This commit is contained in:
Don Honerbrink
2015-07-02 14:51:23 -05:00
parent e7e3d5afa5
commit 238cef121a
4 changed files with 71 additions and 44 deletions

View File

@@ -78,6 +78,11 @@ void CollectionInfo::addSubcollection(CollectionInfo *newinfo)
items.insert(items.begin(), newinfo->items.begin(), newinfo->items.end());
}
bool CollectionInfo::hasSubcollections()
{
return (subcollections_.size() > 0);
}
bool CollectionInfo::itemIsLess(Item *lhs, Item *rhs)
{
return lhs->lowercaseFullTitle() < rhs->lowercaseFullTitle();

View File

@@ -28,6 +28,7 @@ public:
std::string settingsPath() const;
void sortItems();
void addSubcollection(CollectionInfo *info);
bool hasSubcollections();
void extensionList(std::vector<std::string> &extensions);
std::string name;
std::string listpath;