diff options
Diffstat (limited to 'indra/llui/lltoolbar.cpp')
-rw-r--r-- | indra/llui/lltoolbar.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index 392e26f496..7fc6a6de8d 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; @@ -253,7 +257,7 @@ bool LLToolBar::removeCommand(const LLCommandId& commandId) mButtons.erase(it_button); mNeedsLayout = true; - + return true; } @@ -635,8 +639,6 @@ LLToolBarButton* LLToolBar::createButton(const LLCommandId& id) cbParam.parameter = commandp->executeParameters(); button->setCommitCallback(cbParam); - button->setStartDragCallback(mStartDragItemCallback); - button->setHandleDragCallback(mHandleDragItemCallback); const std::string& isEnabledFunction = commandp->isEnabledFunctionName(); if (isEnabledFunction.length() > 0) @@ -671,6 +673,10 @@ LLToolBarButton* LLToolBar::createButton(const LLCommandId& id) } } + // 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; |