diff options
author | Merov Linden <merov@lindenlab.com> | 2011-10-05 17:04:07 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2011-10-05 17:04:07 -0700 |
commit | 64d005bfed6c5adcd29df3ae0774747480a0d839 (patch) | |
tree | 5bcc21f9bb697f20a2a828a8a40ca9c3abd8e217 /indra/llui/lltoolbar.cpp | |
parent | a88bb3231b2685eb640710d7617d26b7f3a2c0d2 (diff) |
EXP-1286 : Add DaD to toybox
Diffstat (limited to 'indra/llui/lltoolbar.cpp')
-rw-r--r-- | indra/llui/lltoolbar.cpp | 11 |
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; |