summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRick Pasetto <rick@lindenlab.com>2010-01-11 16:41:08 -0800
committerRick Pasetto <rick@lindenlab.com>2010-01-11 16:41:08 -0800
commita74d494dd7c13e0307ee5ba526ba021583b1f2b5 (patch)
treea16b3b639042e40507e26c2bfca13f589677ec88 /indra
parentca1a164b6a1f7a77e3b13f46eda6c886bc89406d (diff)
Fix unposted bug: drag feedback didn't check whitelist
http://codereview.lindenlab.com/274039/show
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llviewerwindow.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 81fcfc13c2..5dd640539f 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -912,14 +912,18 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi
}
else {
- if ( obj != mDragHoveredObject)
+ // Check the whitelist, if there's media (otherwise just show it)
+ if (te->getMediaData() == NULL || te->getMediaData()->checkCandidateUrl(url))
{
- // Highlight the dragged object
- LLSelectMgr::getInstance()->unhighlightObjectOnly(mDragHoveredObject);
- mDragHoveredObject = obj;
- LLSelectMgr::getInstance()->highlightObjectOnly(mDragHoveredObject);
+ if ( obj != mDragHoveredObject)
+ {
+ // Highlight the dragged object
+ LLSelectMgr::getInstance()->unhighlightObjectOnly(mDragHoveredObject);
+ mDragHoveredObject = obj;
+ LLSelectMgr::getInstance()->highlightObjectOnly(mDragHoveredObject);
+ }
+ result = (! te->hasMedia()) ? LLWindowCallbacks::DND_COPY : LLWindowCallbacks::DND_LINK;
}
- result = (! te->hasMedia()) ? LLWindowCallbacks::DND_COPY : LLWindowCallbacks::DND_LINK;
}
}
}