diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-04-09 11:25:45 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-04-09 11:25:45 +0100 |
commit | 7efc691e26189b0560ee8b0615c53b0d8bf35e3e (patch) | |
tree | fded5ed43cb07bc681bcd9b3276f210d55e9cf98 /indra/newview/llviewerwindow.cpp | |
parent | dc8f5a7b03a7ab19d134b4da9060028fd7db1cce (diff) | |
parent | 4ed913c3760308ea67db8beb9e6330933104a8ab (diff) |
merge from viewer-trunk
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 35632a745e..0fc38e8561 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -838,7 +838,7 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi LLPanelLogin::refreshLocation( true ); LLPanelLogin::updateLocationUI(); } - return LLWindowCallbacks::DND_MOVE; + return LLWindowCallbacks::DND_COPY; }; } @@ -857,7 +857,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) { @@ -888,29 +892,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); @@ -930,6 +929,7 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi LLSelectMgr::getInstance()->highlightObjectOnly(mDragHoveredObject); } result = (! te->hasMedia()) ? LLWindowCallbacks::DND_COPY : LLWindowCallbacks::DND_LINK; + } } } |