summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2014-07-24 17:42:44 -0700
committerMerov Linden <merov@lindenlab.com>2014-07-24 17:42:44 -0700
commit83603fc939e60c602773cc87e0b6fa316359d467 (patch)
tree2471e8622548365b55ddd54367f1384a6c376d32 /indra/llui
parent87a7eee21d986e2a1c8b5fd467b5da06112690b5 (diff)
DD-128 : Fixed! Recycled allow_open into allow_wear and use an extra virtual methods on bridge items to know if items are wearable or not.
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llfolderviewitem.cpp6
-rw-r--r--indra/llui/llfolderviewitem.h4
-rwxr-xr-xindra/llui/llfolderviewmodel.h2
3 files changed, 7 insertions, 5 deletions
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index cef40351e1..42116251fb 100644
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -104,7 +104,7 @@ LLFolderViewItem::Params::Params()
item_height("item_height"),
item_top_pad("item_top_pad"),
creation_date(),
- allow_open("allow_open", true),
+ allow_wear("allow_wear", true),
font_color("font_color"),
font_highlight_color("font_highlight_color"),
left_pad("left_pad", 0),
@@ -137,7 +137,7 @@ LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p)
mRoot(p.root),
mViewModelItem(p.listener),
mIsMouseOverTitle(false),
- mAllowOpen(p.allow_open),
+ mAllowWear(p.allow_wear),
mFontColor(p.font_color),
mFontHighlightColor(p.font_highlight_color),
mLeftPad(p.left_pad),
@@ -454,7 +454,7 @@ void LLFolderViewItem::buildContextMenu(LLMenuGL& menu, U32 flags)
void LLFolderViewItem::openItem( void )
{
- if (mAllowOpen)
+ if (mAllowWear || !getViewModelItem()->isItemWearable())
{
getViewModelItem()->openItem();
}
diff --git a/indra/llui/llfolderviewitem.h b/indra/llui/llfolderviewitem.h
index a9b0201236..12fba4f9b1 100644
--- a/indra/llui/llfolderviewitem.h
+++ b/indra/llui/llfolderviewitem.h
@@ -59,7 +59,7 @@ public:
item_top_pad;
Optional<time_t> creation_date;
- Optional<bool> allow_open;
+ Optional<bool> allow_wear;
Optional<LLUIColor> font_color;
Optional<LLUIColor> font_highlight_color;
@@ -117,7 +117,7 @@ protected:
mIsCurSelection,
mDragAndDropTarget,
mIsMouseOverTitle,
- mAllowOpen,
+ mAllowWear,
mSelectPending;
LLUIColor mFontColor;
diff --git a/indra/llui/llfolderviewmodel.h b/indra/llui/llfolderviewmodel.h
index 0b968ecee9..99c7c4013c 100755
--- a/indra/llui/llfolderviewmodel.h
+++ b/indra/llui/llfolderviewmodel.h
@@ -156,6 +156,8 @@ public:
virtual void openItem( void ) = 0;
virtual void closeItem( void ) = 0;
virtual void selectItem(void) = 0;
+
+ virtual BOOL isItemWearable() const { return FALSE; }
virtual BOOL isItemRenameable() const = 0;
virtual BOOL renameItem(const std::string& new_name) = 0;