mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2025-12-26 08:38:53 +01:00
Sort by full title alphabetically.
This commit is contained in:
parent
f0604c1789
commit
0ecad71d2e
@ -91,7 +91,7 @@ std::vector<Item *> *CollectionInfo::GetItems()
|
||||
|
||||
bool CollectionInfo::ItemIsLess(Item const *lhs, Item const *rhs)
|
||||
{
|
||||
return lhs->GetLCTitle() < rhs->GetLCTitle();
|
||||
return lhs->GetLCFullTitle() < rhs->GetLCFullTitle();
|
||||
}
|
||||
|
||||
void CollectionInfo::SortItems()
|
||||
|
||||
@ -114,6 +114,11 @@ const std::string& Item::GetLCTitle() const
|
||||
return LCTitle;
|
||||
}
|
||||
|
||||
const std::string& Item::GetLCFullTitle() const
|
||||
{
|
||||
return LCFullTitle;
|
||||
}
|
||||
|
||||
void Item::SetTitle(const std::string& title)
|
||||
{
|
||||
Title = title;
|
||||
@ -149,6 +154,8 @@ const std::string& Item::GetFullTitle() const
|
||||
void Item::SetFullTitle(const std::string& fulltitle)
|
||||
{
|
||||
FullTitle = fulltitle;
|
||||
LCFullTitle = fulltitle;
|
||||
std::transform(LCFullTitle.begin(), LCFullTitle.end(), LCFullCTitle.begin(), ::tolower);
|
||||
}
|
||||
|
||||
const std::string& Item::GetCloneOf() const
|
||||
|
||||
@ -45,6 +45,7 @@ public:
|
||||
bool IsLeaf() const;
|
||||
void SetIsLeaf(bool leaf);
|
||||
const std::string& GetFullTitle() const;
|
||||
const std::string& GetLCFullTitle() const;
|
||||
void SetFullTitle(const std::string& fulltitle);
|
||||
const std::string& GetCloneOf() const;
|
||||
void SetCloneOf(const std::string& cloneOf);
|
||||
@ -56,6 +57,7 @@ private:
|
||||
std::string Title;
|
||||
std::string LCTitle;
|
||||
std::string FullTitle;
|
||||
std::string LCFullTitle;
|
||||
std::string Year;
|
||||
std::string Manufacturer;
|
||||
std::string Genre;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user