summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolbarview.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2012-02-01 19:09:29 -0800
committerMerov Linden <merov@lindenlab.com>2012-02-01 19:09:29 -0800
commitc1636911c84f948e542f445d3c7495e6df185912 (patch)
tree6813798d77b782f834ee37c7df5b344f6d80386e /indra/newview/lltoolbarview.cpp
parent3249a1ced0a4d0bc45d04f5794c989e12e62033b (diff)
EXP-1862 : Make LLClipboard an LLSingleton and clean up the internals (set up for toolbar and never used)
Diffstat (limited to 'indra/newview/lltoolbarview.cpp')
-rw-r--r--indra/newview/lltoolbarview.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp
index eccb2cf2f1..8a0b035234 100644
--- a/indra/newview/lltoolbarview.cpp
+++ b/indra/newview/lltoolbarview.cpp
@@ -75,6 +75,7 @@ LLToolBarView::LLToolBarView(const LLToolBarView::Params& p)
mDragStarted(false),
mShowToolbars(true),
mDragToolbarButton(NULL),
+ mDragItem(NULL),
mToolbarsLoaded(false)
{
for (S32 i = 0; i < TOOLBAR_COUNT; i++)
@@ -579,7 +580,7 @@ BOOL LLToolBarView::handleDragTool( S32 x, S32 y, const LLUUID& uuid, LLAssetTyp
uuid_vec_t cargo_ids;
types.push_back(DAD_WIDGET);
cargo_ids.push_back(uuid);
- gClipboard.setSourceObject(uuid,LLAssetType::AT_WIDGET);
+ LLClipboard::getInstance()->setSourceObject(uuid);
LLToolDragAndDrop::ESource src = LLToolDragAndDrop::SOURCE_VIEWER;
LLUUID srcID;
LLToolDragAndDrop::getInstance()->beginMultiDrag(types, cargo_ids, src, srcID);
@@ -662,6 +663,18 @@ void LLToolBarView::resetDragTool(LLToolBarButton* toolbarButton)
gToolBarView->mDragToolbarButton = toolbarButton;
}
+// Provide a handle on a free standing inventory item containing references to the tool.
+// This might be used by Drag and Drop to move around references to tool items.
+LLInventoryObject* LLToolBarView::getDragItem()
+{
+ if (mDragToolbarButton)
+ {
+ LLUUID item_uuid = mDragToolbarButton->getCommandId().uuid();
+ mDragItem = new LLInventoryObject (item_uuid, LLUUID::null, LLAssetType::AT_WIDGET, "");
+ }
+ return mDragItem;
+}
+
void LLToolBarView::setToolBarsVisible(bool visible)
{
mShowToolbars = visible;