diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-25 10:12:54 -0800 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-25 10:12:54 -0800 |
commit | 6ff6ed4d1148a66b188472c94b58bd573389942d (patch) | |
tree | a4a6e2a4711c3d9a3dd019e98507a568cac4ba60 /indra/newview/llpanelplaces.cpp | |
parent | f11f8b34478f0d408689fe7959f233567001374d (diff) | |
parent | 254b7d72d17c279aa906ee235f08ff1fa9e2b9cf (diff) |
PE merge.
Diffstat (limited to 'indra/newview/llpanelplaces.cpp')
-rw-r--r-- | indra/newview/llpanelplaces.cpp | 14 |
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(); |