1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-27 03:35:27 +00:00

Merge branch 'quest_list' into 'master'

Sort quests in journal by name

See merge request OpenMW/openmw!2584
This commit is contained in:
psi29a 2023-01-07 17:03:47 +00:00
commit 6aaceb44c2
4 changed files with 11 additions and 0 deletions

View File

@ -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

View File

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

View File

@ -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());

View File

@ -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);