Sort quests in journal by name (bug 7054)

7220-lua-add-a-general-purpose-lexical-parser
Andrei Kortunov 1 year ago
parent c9d57788fb
commit 9630246cae

@ -28,6 +28,7 @@
Bug #7034: Misc items defined in one content file are not treated as keys if another content file uses them as such
Bug #7042: Weapon follow animations that immediately follow the hit animations cause multiple hits
Bug #7044: Changing a class' services does not affect autocalculated NPCs
Bug #7054: Quests aren't sorted by name
Bug #7084: Resurrecting an actor doesn't take into account base record changes
Bug #7088: Deleting last save game of last character doesn't clear character name/details
Feature #6447: Add LOD support to Object Paging

@ -558,6 +558,7 @@ namespace
mModel->visitQuestNames(!mAllQuests, add);
list->sort();
list->adjustSize();
if (mAllQuests)

@ -4,6 +4,8 @@
#include <MyGUI_Gui.h>
#include <MyGUI_ImageBox.h>
#include <components/misc/strings/algorithm.hpp>
namespace Gui
{
@ -124,6 +126,12 @@ namespace Gui
return mItems[at];
}
void MWList::sort()
{
// A special case for separators is not needed for now
std::sort(mItems.begin(), mItems.end(), Misc::StringUtils::ciLess);
}
void MWList::removeItem(const std::string& name)
{
assert(std::find(mItems.begin(), mItems.end(), name) != mItems.end());

@ -35,6 +35,7 @@ namespace Gui
*/
void adjustSize();
void sort();
void addItem(std::string_view name);
void addSeparator(); ///< add a seperator between the current and the next item.
void removeItem(const std::string& name);

Loading…
Cancel
Save