FIRE-21200: List attachment spots in "Attach to" lists in alphabetical order
parent
5cad3bc844
commit
1730f9a999
|
|
@ -541,6 +541,10 @@ public:
|
|||
// add a context menu branch
|
||||
BOOL appendContextSubMenu(LLMenuGL *menu);
|
||||
|
||||
// <FS:Ansariel> Items-accessor
|
||||
typedef std::list< LLMenuItemGL* > item_list_t;
|
||||
item_list_t* getItems() { return &mItems; }
|
||||
|
||||
protected:
|
||||
void createSpilloverBranch();
|
||||
void cleanupSpilloverBranch();
|
||||
|
|
@ -555,7 +559,7 @@ protected:
|
|||
bool addContextChild(LLView* view, S32 tab_group);
|
||||
|
||||
// TODO: create accessor methods for these?
|
||||
typedef std::list< LLMenuItemGL* > item_list_t;
|
||||
//typedef std::list< LLMenuItemGL* > item_list_t; // <FS:Ansariel> Items-accessor
|
||||
item_list_t mItems;
|
||||
LLMenuItemGL*mFirstVisibleItem;
|
||||
LLMenuItemGL *mArrowUpItem, *mArrowDownItem;
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@
|
|||
#endif
|
||||
// </FS:Zi>
|
||||
#include "fsfloaterplacedetails.h"
|
||||
#include "llviewerattachmenu.h"
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
|
|
@ -6939,6 +6940,11 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
|
|||
LLUICtrlFactory::create<LLMenuItemCallGL>(p, parent);
|
||||
items.push_back(p.name);
|
||||
}
|
||||
|
||||
// <FS:Ansariel> FIRE-21200: Attachment Points List in Alphabetical Order
|
||||
attach_menu->getItems()->sort(LLViewerAttachMenu::sort());
|
||||
attach_hud_menu->getItems()->sort(LLViewerAttachMenu::sort());
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,6 +88,11 @@ void LLViewerAttachMenu::populateMenus(const std::string& attach_to_menu_name, c
|
|||
LLView* parent_menu = attachment->getIsHUDAttachment() ? attach_hud_menu : attach_menu;
|
||||
parent_menu->addChild(item);
|
||||
}
|
||||
|
||||
// <FS:Ansariel> FIRE-21200: Attachment Points List in Alphabetical Order
|
||||
attach_menu->getItems()->sort(LLViewerAttachMenu::sort());
|
||||
attach_hud_menu->getItems()->sort(LLViewerAttachMenu::sort());
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
|
||||
// static
|
||||
|
|
|
|||
|
|
@ -27,11 +27,23 @@
|
|||
#ifndef LL_LLVIEWERATTACHMENU_H
|
||||
#define LL_LLVIEWERATTACHMENU_H
|
||||
|
||||
#include "llmenugl.h"
|
||||
|
||||
class LLViewerAttachMenu
|
||||
{
|
||||
public:
|
||||
static void populateMenus(const std::string& attach_to_menu_name, const std::string& attach_to_hud_menu_name);
|
||||
static void attachObjects(const uuid_vec_t& items, const std::string& joint_name);
|
||||
|
||||
// <FS:Ansariel> FIRE-21200: Attachment Points List in Alphabetical Order
|
||||
struct sort
|
||||
{
|
||||
bool operator()(const LLMenuItemGL* i1, const LLMenuItemGL* i2)
|
||||
{
|
||||
return i1->getName().compare(i2->getName()) <= 0;
|
||||
}
|
||||
};
|
||||
// </FS:Ansariel>
|
||||
};
|
||||
|
||||
#endif // LL_LLVIEWERATTACHMENU_H
|
||||
|
|
|
|||
Loading…
Reference in New Issue