summaryrefslogtreecommitdiff
path: root/indra/llui/lltoolbar.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2011-10-05 17:04:07 -0700
committerMerov Linden <merov@lindenlab.com>2011-10-05 17:04:07 -0700
commit64d005bfed6c5adcd29df3ae0774747480a0d839 (patch)
tree5bcc21f9bb697f20a2a828a8a40ca9c3abd8e217 /indra/llui/lltoolbar.cpp
parenta88bb3231b2685eb640710d7617d26b7f3a2c0d2 (diff)
EXP-1286 : Add DaD to toybox
Diffstat (limited to 'indra/llui/lltoolbar.cpp')
-rw-r--r--indra/llui/lltoolbar.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp
index 9ffb859053..ef36f426fa 100644
--- a/indra/llui/lltoolbar.cpp
+++ b/indra/llui/lltoolbar.cpp
@@ -103,7 +103,11 @@ LLToolBar::LLToolBar(const LLToolBar::Params& p)
mPadTop(p.pad_top),
mPadBottom(p.pad_bottom),
mPadBetween(p.pad_between),
- mPopupMenuHandle()
+ mPopupMenuHandle(),
+ mStartDragItemCallback(NULL),
+ mHandleDragItemCallback(NULL),
+ mHandleDropCallback(NULL),
+ mDragAndDropTarget(false)
{
mButtonParams[LLToolBarEnums::BTNTYPE_ICONS_WITH_TEXT] = p.button_icon_and_text;
mButtonParams[LLToolBarEnums::BTNTYPE_ICONS_ONLY] = p.button_icon;
@@ -608,9 +612,10 @@ LLToolBarButton* LLToolBar::createButton(const LLCommandId& id)
cbParam.function_name = commandp->executeFunctionName();
cbParam.parameter = commandp->executeParameters();
button->setCommitCallback(cbParam);
- button->setStartDragCallback(mStartDragItemCallback);
- button->setHandleDragCallback(mHandleDragItemCallback);
}
+ // Drag and drop behavior must work also if provided in the Toybox and, potentially, any read-only toolbar
+ button->setStartDragCallback(mStartDragItemCallback);
+ button->setHandleDragCallback(mHandleDragItemCallback);
button->setCommandId(id);
return button;