summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
authorRick Pasetto <rick@lindenlab.com>2009-12-18 16:21:57 -0800
committerRick Pasetto <rick@lindenlab.com>2009-12-18 16:21:57 -0800
commit9204681c31184c4c76c8f41c48da76e174e3276a (patch)
treef4bb01f2e04997c6e15d49f63f78576becdbd58f /indra/newview/llviewerwindow.cpp
parent3b110e76332712e7efb7972fb27324a763596b6c (diff)
Fix slurl crashing, fix slurls highlighting objects, fix overlapping objects not "unhighlighting"
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r--indra/newview/llviewerwindow.cpp24
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;
}
}