mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2026-01-06 05:59:51 +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)
|
bool CollectionInfo::ItemIsLess(Item const *lhs, Item const *rhs)
|
||||||
{
|
{
|
||||||
return lhs->GetLCTitle() < rhs->GetLCTitle();
|
return lhs->GetLCFullTitle() < rhs->GetLCFullTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CollectionInfo::SortItems()
|
void CollectionInfo::SortItems()
|
||||||
|
|||||||
@ -114,6 +114,11 @@ const std::string& Item::GetLCTitle() const
|
|||||||
return LCTitle;
|
return LCTitle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const std::string& Item::GetLCFullTitle() const
|
||||||
|
{
|
||||||
|
return LCFullTitle;
|
||||||
|
}
|
||||||
|
|
||||||
void Item::SetTitle(const std::string& title)
|
void Item::SetTitle(const std::string& title)
|
||||||
{
|
{
|
||||||
Title = title;
|
Title = title;
|
||||||
@ -149,6 +154,8 @@ const std::string& Item::GetFullTitle() const
|
|||||||
void Item::SetFullTitle(const std::string& fulltitle)
|
void Item::SetFullTitle(const std::string& fulltitle)
|
||||||
{
|
{
|
||||||
FullTitle = fulltitle;
|
FullTitle = fulltitle;
|
||||||
|
LCFullTitle = fulltitle;
|
||||||
|
std::transform(LCFullTitle.begin(), LCFullTitle.end(), LCFullCTitle.begin(), ::tolower);
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string& Item::GetCloneOf() const
|
const std::string& Item::GetCloneOf() const
|
||||||
|
|||||||
@ -45,6 +45,7 @@ public:
|
|||||||
bool IsLeaf() const;
|
bool IsLeaf() const;
|
||||||
void SetIsLeaf(bool leaf);
|
void SetIsLeaf(bool leaf);
|
||||||
const std::string& GetFullTitle() const;
|
const std::string& GetFullTitle() const;
|
||||||
|
const std::string& GetLCFullTitle() const;
|
||||||
void SetFullTitle(const std::string& fulltitle);
|
void SetFullTitle(const std::string& fulltitle);
|
||||||
const std::string& GetCloneOf() const;
|
const std::string& GetCloneOf() const;
|
||||||
void SetCloneOf(const std::string& cloneOf);
|
void SetCloneOf(const std::string& cloneOf);
|
||||||
@ -56,6 +57,7 @@ private:
|
|||||||
std::string Title;
|
std::string Title;
|
||||||
std::string LCTitle;
|
std::string LCTitle;
|
||||||
std::string FullTitle;
|
std::string FullTitle;
|
||||||
|
std::string LCFullTitle;
|
||||||
std::string Year;
|
std::string Year;
|
||||||
std::string Manufacturer;
|
std::string Manufacturer;
|
||||||
std::string Genre;
|
std::string Genre;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user