MAINT-1639 FIXED map seach clears itself when you are at the first place in map search

meow-7.2.2
Mnikolenko Productengine 2016-04-28 13:06:55 +03:00
parent b493edd2c3
commit e05c7d70d4
4 changed files with 7 additions and 7 deletions

View File

@ -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);
}

View File

@ -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);

View File

@ -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;
}

View File

@ -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);