summaryrefslogtreecommitdiff
path: root/indra/newview/lltooldraganddrop.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2010-04-07 13:30:21 -0400
committerLoren Shih <seraph@lindenlab.com>2010-04-07 13:30:21 -0400
commit5d3de2ea03ff500690acec13fd4b403dc8a72088 (patch)
treec16bcbe34d65de983e58f94a5837f603e616d17e /indra/newview/lltooldraganddrop.cpp
parente9f06764412af37023f45c4d83b2b97c48d2a13e (diff)
EXT-6745 : Refactor LLFetchComboObserver to use LLFetchItems and LLFetchDescedents instead of code duplication
Took out a bunch of code duplication from the FetchComboObserver and am using the LLFetchItems/DescendentsObservers instead. Also added some comments and made some minor superficial cleanup to LLInventoryObserver done().
Diffstat (limited to 'indra/newview/lltooldraganddrop.cpp')
-rw-r--r--indra/newview/lltooldraganddrop.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index a67067d29c..774626f19d 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -232,6 +232,9 @@ bool LLGiveable::operator()(LLInventoryCategory* cat, LLInventoryItem* item)
return allowed;
}
+// Starts a fetch on folders and items. This is really not used
+// as an observer in the traditional sense; we're just using it to
+// request a fetch and we don't care about when/if the response arrives.
class LLCategoryFireAndForget : public LLInventoryFetchComboObserver
{
public:
@@ -485,8 +488,9 @@ void LLToolDragAndDrop::beginDrag(EDragAndDropType type,
}
if (!folder_ids.empty() || !item_ids.empty())
{
- LLCategoryFireAndForget fetcher(folder_ids, item_ids);
- fetcher.startFetch();
+ LLCategoryFireAndForget *fetcher = new LLCategoryFireAndForget(folder_ids, item_ids);
+ fetcher->startFetch();
+ delete fetcher;
}
}
}