diff options
author | Josh Bell <josh@lindenlab.com> | 2007-12-29 01:40:57 +0000 |
---|---|---|
committer | Josh Bell <josh@lindenlab.com> | 2007-12-29 01:40:57 +0000 |
commit | d06e5e3519f13197dd62bfbabf76f7efcc3d7a79 (patch) | |
tree | 62b363ba11a3cc7dd78343e63ad440284f0252f3 /indra/newview/llviewerinventory.cpp | |
parent | 79680891a73be074aa449a9ccdf695b0afd300d8 (diff) |
svn merge -r 76642:76643 svn+ssh://svn.lindenlab.com/svn/linden/qa/maintenance-4-merge-76640
Redo of QAR-170, with correct range. Reviewed by CG.
Diffstat (limited to 'indra/newview/llviewerinventory.cpp')
-rw-r--r-- | indra/newview/llviewerinventory.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index b5316d29e0..981605d1fa 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -47,7 +47,7 @@ #include "llviewerregion.h" #include "llviewerobjectlist.h" - +#include "llpreviewgesture.h" ///---------------------------------------------------------------------------- /// Local function declarations, constants, enums, and typedefs ///---------------------------------------------------------------------------- @@ -643,6 +643,26 @@ void ActivateGestureCallback::fire(const LLUUID& inv_item) gGestureManager.activateGesture(inv_item); } +void CreateGestureCallback::fire(const LLUUID& inv_item) +{ + if (inv_item.isNull()) + return; + + gGestureManager.activateGesture(inv_item); + + LLViewerInventoryItem* item = gInventory.getItem(inv_item); + if (!item) return; + gInventory.updateItem(item); + gInventory.notifyObservers(); + + if(!LLPreview::show(inv_item,FALSE)) + { + LLPreviewGesture* preview = LLPreviewGesture::show(LLString("Gesture: ") + item->getName(), inv_item, LLUUID::null); + // Force to be entirely onscreen. + gFloaterView->adjustToFitScreen(preview, FALSE); + } +} + LLInventoryCallbackManager gInventoryCallbacks; void create_inventory_item(const LLUUID& agent_id, const LLUUID& session_id, |