diff options
author | Sergei Litovchuk <slitovchuk@productengine.com> | 2010-01-25 17:28:39 +0200 |
---|---|---|
committer | Sergei Litovchuk <slitovchuk@productengine.com> | 2010-01-25 17:28:39 +0200 |
commit | d3d7dd6a6215a7ae50979a5a303ef9c109937822 (patch) | |
tree | 003f436ad078f63d199c68f1f764c33890cbe1c2 /indra | |
parent | 307d94a92aa2111b05b7ab327685d1b2d79b68f3 (diff) |
(EXT-2249) Place profile data blinks several times while updating after teleport
- Reduced place info unnecessary text and icons updates.
--HG--
branch : product-engine
Diffstat (limited to 'indra')
-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(); |