diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2016-04-28 13:06:55 +0300 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2016-04-28 13:06:55 +0300 |
commit | e05c7d70d4bb338426c29728659dd6ef75459e0d (patch) | |
tree | 0b4804d4201ce7ae5ee5a4bf92fb0d75036b191e /indra/newview | |
parent | b493edd2c32273b767d8bc3177b3b662947a5655 (diff) |
MAINT-1639 FIXED map seach clears itself when you are at the first place in map search
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llfloaterworldmap.cpp | 4 | ||||
-rwxr-xr-x | indra/newview/llfloaterworldmap.h | 2 | ||||
-rwxr-xr-x | indra/newview/lltracker.cpp | 6 | ||||
-rwxr-xr-x | indra/newview/lltracker.h | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index ece3e10faa..c67feb8158 100755 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -963,10 +963,10 @@ F32 LLFloaterWorldMap::getDistanceToDestination(const LLVector3d &destination, } -void LLFloaterWorldMap::clearLocationSelection(BOOL clear_ui) +void LLFloaterWorldMap::clearLocationSelection(BOOL clear_ui, BOOL dest_reached) { LLCtrlListInterface *list = mListSearchResults; - if (list) + if (list && (!dest_reached || (list->getItemCount() == 1))) { list->operateOnAll(LLCtrlListInterface::OP_DELETE); } diff --git a/indra/newview/llfloaterworldmap.h b/indra/newview/llfloaterworldmap.h index 7ce8dae9a9..c5801c8819 100755 --- a/indra/newview/llfloaterworldmap.h +++ b/indra/newview/llfloaterworldmap.h @@ -94,7 +94,7 @@ public: // A z_attenuation of 0.0f collapses the distance into the X-Y plane F32 getDistanceToDestination(const LLVector3d& pos_global, F32 z_attenuation = 0.5f) const; - void clearLocationSelection(BOOL clear_ui = FALSE); + void clearLocationSelection(BOOL clear_ui = FALSE, BOOL dest_reached = FALSE); void clearAvatarSelection(BOOL clear_ui = FALSE); void clearLandmarkSelection(BOOL clear_ui = FALSE); diff --git a/indra/newview/lltracker.cpp b/indra/newview/lltracker.cpp index f611d0503f..b015cde45d 100755 --- a/indra/newview/lltracker.cpp +++ b/indra/newview/lltracker.cpp @@ -183,7 +183,7 @@ void LLTracker::render3D() F32 dist = gFloaterWorldMap->getDistanceToDestination(pos_global, 0.5f); if (dist < DESTINATION_REACHED_RADIUS) { - instance()->stopTrackingLocation(); + instance()->stopTrackingLocation(FALSE,TRUE); } else { @@ -655,13 +655,13 @@ void LLTracker::stopTrackingLandmark(BOOL clear_ui) } -void LLTracker::stopTrackingLocation(BOOL clear_ui) +void LLTracker::stopTrackingLocation(BOOL clear_ui, BOOL dest_reached) { purgeBeaconText(); mTrackedLocationName.assign(""); mIsTrackingLocation = FALSE; mTrackedPositionGlobal.zeroVec(); - gFloaterWorldMap->clearLocationSelection(clear_ui); + gFloaterWorldMap->clearLocationSelection(clear_ui, dest_reached); mTrackingStatus = TRACKING_NOTHING; mTrackingLocationType = LOCATION_NOTHING; } diff --git a/indra/newview/lltracker.h b/indra/newview/lltracker.h index 218f3430a6..a1c5052c1b 100755 --- a/indra/newview/lltracker.h +++ b/indra/newview/lltracker.h @@ -116,7 +116,7 @@ protected: void stopTrackingAll(BOOL clear_ui = FALSE); void stopTrackingAvatar(BOOL clear_ui = FALSE); - void stopTrackingLocation(BOOL clear_ui = FALSE); + void stopTrackingLocation(BOOL clear_ui = FALSE, BOOL dest_reached = FALSE); void stopTrackingLandmark(BOOL clear_ui = FALSE); void drawMarker(const LLVector3d& pos_global, const LLColor4& color); |