summaryrefslogtreecommitdiff
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
parent3b110e76332712e7efb7972fb27324a763596b6c (diff)
Fix slurl crashing, fix slurls highlighting objects, fix overlapping objects not "unhighlighting"
-rw-r--r--indra/newview/llpanellogin.cpp2
-rw-r--r--indra/newview/llviewerwindow.cpp24
2 files changed, 17 insertions, 9 deletions
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index cdfa64ba57..ce83ab3e37 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -688,6 +688,8 @@ void LLPanelLogin::refreshLocation( bool force_visible )
// static
void LLPanelLogin::updateLocationUI()
{
+ if (!sInstance) return;
+
std::string sim_string = LLURLSimString::sInstance.mSimString;
if (!sim_string.empty())
{
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;
}
}