summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelplaces.cpp
diff options
context:
space:
mode:
authorRoxie Linden <roxie@lindenlab.com>2010-02-25 16:50:21 -0800
committerRoxie Linden <roxie@lindenlab.com>2010-02-25 16:50:21 -0800
commit5ed6e0720af1b6cdf1a983e2c040eeb5d8ae33ba (patch)
tree5d0141f43cfaf59e5cb62eb2f4ca9541160e6173 /indra/newview/llpanelplaces.cpp
parent3ab4b0f58326a01a09aa99f262c03d2703215af2 (diff)
parent6e932911d5b0a02b44caf3bf81a9c00fd0e1dc89 (diff)
warn-on-failure:unix-eol
automated merge from trunk
Diffstat (limited to 'indra/newview/llpanelplaces.cpp')
-rw-r--r--indra/newview/llpanelplaces.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index a4f0e55a93..a8a9717750 100644
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -384,6 +384,10 @@ void LLPanelPlaces::onOpen(const LLSD& key)
// Otherwise stop using land selection and deselect land.
if (mPlaceInfoType == AGENT_INFO_TYPE)
{
+ // We don't know if we are already added to LLViewerParcelMgr observers list
+ // so try to remove observer not to add an extra one.
+ parcel_mgr->removeObserver(mParcelObserver);
+
parcel_mgr->addObserver(mParcelObserver);
parcel_mgr->selectParcelAt(gAgent.getPositionGlobal());
}
@@ -898,6 +902,8 @@ void LLPanelPlaces::changedParcelSelection()
if (!region || !parcel)
return;
+ LLVector3d prev_pos_global = mPosGlobal;
+
// If agent is inside the selected parcel show agent's region<X, Y, Z>,
// otherwise show region<X, Y, Z> of agent's selection point.
bool is_current_parcel = is_agent_in_selected_parcel(parcel);
@@ -914,7 +920,13 @@ void LLPanelPlaces::changedParcelSelection()
}
}
- mPlaceProfile->resetLocation();
+ // Reset location info only if global position is changed
+ // to reduce unnecessary text and icons updates.
+ if (prev_pos_global != mPosGlobal)
+ {
+ mPlaceProfile->resetLocation();
+ }
+
mPlaceProfile->displaySelectedParcelInfo(parcel, region, mPosGlobal, is_current_parcel);
updateVerbs();