diff options
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 08f598b288..71fe8dd773 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -839,12 +839,15 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi bool drop = (LLWindowCallbacks::DNDA_DROPPED == action); // special case SLURLs - if ( drop && std::string::npos != data.find("slurl.com") ) + if (std::string::npos != data.find("slurl.com") ) { - LLURLDispatcher::dispatch( data, NULL, true ); - LLURLSimString::setString( LLSLURL::stripProtocol( data ) ); - LLPanelLogin::refreshLocation( true ); - LLPanelLogin::updateLocationUI(); + if (drop) + { + LLURLDispatcher::dispatch( data, NULL, true ); + LLURLSimString::setString( LLSLURL::stripProtocol( data ) ); + LLPanelLogin::refreshLocation( true ); + LLPanelLogin::updateLocationUI(); + } return LLWindowCallbacks::DND_MOVE; }; @@ -908,10 +911,13 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi } else { - mDragHoveredObject = obj; - // Highlight the dragged object - 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; } } |