diff options
author | Leyla Farazha <leyla@lindenlab.com> | 2010-04-07 15:03:27 -0700 |
---|---|---|
committer | Leyla Farazha <leyla@lindenlab.com> | 2010-04-07 15:03:27 -0700 |
commit | 8bf3a6ad2ba5b3becbd12fcc1927256d640b7bf2 (patch) | |
tree | e530a5c0b23220d8bb317ab4fe128137550b5ba7 /indra/newview | |
parent | a0a7b7ed16a9161b8060e8f32e5594356e5c7329 (diff) |
EXT-6308 Drag and Drop cursor indicates you can drop a URL on a Shared Media prim that you are not allowed to Navigate
reviewd by Richard cc# 178
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 4c6a02db87..1ca49c6ea3 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -851,7 +851,11 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi if (obj && !obj->getRegion()->getCapability("ObjectMedia").empty()) { LLTextureEntry *te = obj->getTE(object_face); - if (te) + + // can modify URL if we can modify the object or we have navigate permissions + bool allow_modify_url = obj->permModify() || obj->hasMediaPermission( te->getMediaData(), LLVOVolume::MEDIA_PERM_INTERACT ); + + if (te && allow_modify_url ) { if (drop) { @@ -882,29 +886,24 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi // URL passes the whitelist if (te->getMediaData()->checkCandidateUrl( url ) ) { - // we are allowed to modify the object or we have navigate permissions - // NOTE: Design states you you can change the URL if you have media - // navigate permissions even if you do not have prim modify rights - if ( obj->permModify() || obj->hasMediaPermission( te->getMediaData(), LLVOVolume::MEDIA_PERM_INTERACT ) ) + // just navigate to the URL + if (obj->getMediaImpl(object_face)) { - // just navigate to the URL - if (obj->getMediaImpl(object_face)) - { - obj->getMediaImpl(object_face)->navigateTo(url); - } - else - { - // This is very strange. Navigation should - // happen via the Impl, but we don't have one. - // This sends it to the server, which /should/ - // trigger us getting it. Hopefully. - LLSD media_data; - media_data[LLMediaEntry::CURRENT_URL_KEY] = url; - obj->syncMediaData(object_face, media_data, true, true); - obj->sendMediaDataUpdate(); - } - result = LLWindowCallbacks::DND_LINK; + obj->getMediaImpl(object_face)->navigateTo(url); } + else + { + // This is very strange. Navigation should + // happen via the Impl, but we don't have one. + // This sends it to the server, which /should/ + // trigger us getting it. Hopefully. + LLSD media_data; + media_data[LLMediaEntry::CURRENT_URL_KEY] = url; + obj->syncMediaData(object_face, media_data, true, true); + obj->sendMediaDataUpdate(); + } + result = LLWindowCallbacks::DND_LINK; + } } LLSelectMgr::getInstance()->unhighlightObjectOnly(mDragHoveredObject); @@ -924,6 +923,7 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi LLSelectMgr::getInstance()->highlightObjectOnly(mDragHoveredObject); } result = (! te->hasMedia()) ? LLWindowCallbacks::DND_COPY : LLWindowCallbacks::DND_LINK; + } } } |