@@ -406,9 +406,12 @@ bool LLFloaterWorldMap::postBuild()
406406 F32 slider_zoom = mMapView ->getZoom ();
407407 mZoomSlider ->setValue (slider_zoom);
408408
409+ mTrackCtrlsPanel = getChild<LLPanel>(" layout_panel_4" );
410+ mSearchButton = getChild<LLButton>(" DoSearch" );
411+
409412 getChild<LLPanel>(" expand_btn_panel" )->setMouseDownCallback (boost::bind (&LLFloaterWorldMap::onExpandCollapseBtn, this ));
410413
411- setDefaultBtn (NULL );
414+ mTrackCtrlsPanel -> setDefaultBtn (nullptr );
412415
413416 onChangeMaturity ();
414417
@@ -728,7 +731,7 @@ void LLFloaterWorldMap::trackAvatar( const LLUUID& avatar_id, const std::string&
728731 {
729732 LLTracker::stopTracking (false );
730733 }
731- setDefaultBtn (" Teleport " );
734+ mTrackCtrlsPanel -> setDefaultBtn (mTeleportButton );
732735}
733736
734737void LLFloaterWorldMap::trackLandmark ( const LLUUID& landmark_item_id )
@@ -773,7 +776,7 @@ void LLFloaterWorldMap::trackLandmark( const LLUUID& landmark_item_id )
773776 {
774777 LLTracker::stopTracking (false );
775778 }
776- setDefaultBtn (" Teleport " );
779+ mTrackCtrlsPanel -> setDefaultBtn (mTeleportButton );
777780}
778781
779782
@@ -782,15 +785,15 @@ void LLFloaterWorldMap::trackEvent(const LLItemInfo &event_info)
782785 mShowParcelInfo = false ;
783786 mTrackedStatus = LLTracker::TRACKING_LOCATION;
784787 LLTracker::trackLocation (event_info.getGlobalPosition (), event_info.getName (), event_info.getToolTip (), LLTracker::LOCATION_EVENT);
785- setDefaultBtn (" Teleport " );
788+ mTrackCtrlsPanel -> setDefaultBtn (mTeleportButton );
786789}
787790
788791void LLFloaterWorldMap::trackGenericItem (const LLItemInfo &item)
789792{
790793 mShowParcelInfo = false ;
791794 mTrackedStatus = LLTracker::TRACKING_LOCATION;
792795 LLTracker::trackLocation (item.getGlobalPosition (), item.getName (), item.getToolTip (), LLTracker::LOCATION_ITEM);
793- setDefaultBtn (" Teleport " );
796+ mTrackCtrlsPanel -> setDefaultBtn (mTeleportButton );
794797}
795798
796799void LLFloaterWorldMap::trackLocation (const LLVector3d& pos_global)
@@ -804,7 +807,7 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global)
804807 S32 world_x = S32 (pos_global.mdV [0 ] / 256 );
805808 S32 world_y = S32 (pos_global.mdV [1 ] / 256 );
806809 LLWorldMapMessage::getInstance ()->sendMapBlockRequest (world_x, world_y, world_x, world_y, true );
807- setDefaultBtn (" " );
810+ mTrackCtrlsPanel -> setDefaultBtn (nullptr );
808811
809812 // clicked on a non-region - turn off coord display
810813 enableTeleportCoordsDisplay ( false );
@@ -818,7 +821,7 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global)
818821 LLTracker::stopTracking (false );
819822 LLWorldMap::getInstance ()->setTracking (pos_global);
820823 LLWorldMap::getInstance ()->setTrackingInvalid ();
821- setDefaultBtn (" " );
824+ mTrackCtrlsPanel -> setDefaultBtn (nullptr );
822825
823826 // clicked on a down region - turn off coord display
824827 enableTeleportCoordsDisplay ( false );
@@ -849,7 +852,7 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global)
849852 // we have a valid region - turn on coord display
850853 enableTeleportCoordsDisplay ( true );
851854
852- setDefaultBtn (" Teleport " );
855+ mTrackCtrlsPanel -> setDefaultBtn (mTeleportButton );
853856}
854857
855858// enable/disable teleport destination coordinates
@@ -964,7 +967,7 @@ void LLFloaterWorldMap::trackURL(const std::string& region_name, S32 x_coord, S3
964967 local_pos.mV [VZ] = (F32)z_coord;
965968 LLVector3d global_pos = sim_info->getGlobalPos (local_pos);
966969 trackLocation (global_pos);
967- setDefaultBtn (" Teleport " );
970+ mTrackCtrlsPanel -> setDefaultBtn (mTeleportButton );
968971 }
969972 else
970973 {
@@ -1375,11 +1378,11 @@ void LLFloaterWorldMap::updateSearchEnabled()
13751378 if (childHasKeyboardFocus (" location" ) &&
13761379 mLocationEditor ->getValue ().asString ().length () > 0 )
13771380 {
1378- setDefaultBtn (" DoSearch " );
1381+ mTrackCtrlsPanel -> setDefaultBtn (mSearchButton );
13791382 }
13801383 else
13811384 {
1382- setDefaultBtn (NULL );
1385+ mTrackCtrlsPanel -> setDefaultBtn (nullptr );
13831386 }
13841387}
13851388
@@ -1800,7 +1803,7 @@ void LLFloaterWorldMap::onCommitSearchResult()
18001803
18011804 mLocationEditor ->setValue (sim_name);
18021805 trackLocation (pos_global);
1803- setDefaultBtn (" Teleport " );
1806+ mTrackCtrlsPanel -> setDefaultBtn (mTeleportButton );
18041807 break ;
18051808 }
18061809 }
0 commit comments