@@ -406,9 +406,12 @@ bool LLFloaterWorldMap::postBuild()
406
406
F32 slider_zoom = mMapView ->getZoom ();
407
407
mZoomSlider ->setValue (slider_zoom);
408
408
409
+ mTrackCtrlsPanel = getChild<LLPanel>(" layout_panel_4" );
410
+ mSearchButton = getChild<LLButton>(" DoSearch" );
411
+
409
412
getChild<LLPanel>(" expand_btn_panel" )->setMouseDownCallback (boost::bind (&LLFloaterWorldMap::onExpandCollapseBtn, this ));
410
413
411
- setDefaultBtn (NULL );
414
+ mTrackCtrlsPanel -> setDefaultBtn (nullptr );
412
415
413
416
onChangeMaturity ();
414
417
@@ -728,7 +731,7 @@ void LLFloaterWorldMap::trackAvatar( const LLUUID& avatar_id, const std::string&
728
731
{
729
732
LLTracker::stopTracking (false );
730
733
}
731
- setDefaultBtn (" Teleport " );
734
+ mTrackCtrlsPanel -> setDefaultBtn (mTeleportButton );
732
735
}
733
736
734
737
void LLFloaterWorldMap::trackLandmark ( const LLUUID& landmark_item_id )
@@ -773,7 +776,7 @@ void LLFloaterWorldMap::trackLandmark( const LLUUID& landmark_item_id )
773
776
{
774
777
LLTracker::stopTracking (false );
775
778
}
776
- setDefaultBtn (" Teleport " );
779
+ mTrackCtrlsPanel -> setDefaultBtn (mTeleportButton );
777
780
}
778
781
779
782
@@ -782,15 +785,15 @@ void LLFloaterWorldMap::trackEvent(const LLItemInfo &event_info)
782
785
mShowParcelInfo = false ;
783
786
mTrackedStatus = LLTracker::TRACKING_LOCATION;
784
787
LLTracker::trackLocation (event_info.getGlobalPosition (), event_info.getName (), event_info.getToolTip (), LLTracker::LOCATION_EVENT);
785
- setDefaultBtn (" Teleport " );
788
+ mTrackCtrlsPanel -> setDefaultBtn (mTeleportButton );
786
789
}
787
790
788
791
void LLFloaterWorldMap::trackGenericItem (const LLItemInfo &item)
789
792
{
790
793
mShowParcelInfo = false ;
791
794
mTrackedStatus = LLTracker::TRACKING_LOCATION;
792
795
LLTracker::trackLocation (item.getGlobalPosition (), item.getName (), item.getToolTip (), LLTracker::LOCATION_ITEM);
793
- setDefaultBtn (" Teleport " );
796
+ mTrackCtrlsPanel -> setDefaultBtn (mTeleportButton );
794
797
}
795
798
796
799
void LLFloaterWorldMap::trackLocation (const LLVector3d& pos_global)
@@ -804,7 +807,7 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global)
804
807
S32 world_x = S32 (pos_global.mdV [0 ] / 256 );
805
808
S32 world_y = S32 (pos_global.mdV [1 ] / 256 );
806
809
LLWorldMapMessage::getInstance ()->sendMapBlockRequest (world_x, world_y, world_x, world_y, true );
807
- setDefaultBtn (" " );
810
+ mTrackCtrlsPanel -> setDefaultBtn (nullptr );
808
811
809
812
// clicked on a non-region - turn off coord display
810
813
enableTeleportCoordsDisplay ( false );
@@ -818,7 +821,7 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global)
818
821
LLTracker::stopTracking (false );
819
822
LLWorldMap::getInstance ()->setTracking (pos_global);
820
823
LLWorldMap::getInstance ()->setTrackingInvalid ();
821
- setDefaultBtn (" " );
824
+ mTrackCtrlsPanel -> setDefaultBtn (nullptr );
822
825
823
826
// clicked on a down region - turn off coord display
824
827
enableTeleportCoordsDisplay ( false );
@@ -849,7 +852,7 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global)
849
852
// we have a valid region - turn on coord display
850
853
enableTeleportCoordsDisplay ( true );
851
854
852
- setDefaultBtn (" Teleport " );
855
+ mTrackCtrlsPanel -> setDefaultBtn (mTeleportButton );
853
856
}
854
857
855
858
// enable/disable teleport destination coordinates
@@ -964,7 +967,7 @@ void LLFloaterWorldMap::trackURL(const std::string& region_name, S32 x_coord, S3
964
967
local_pos.mV [VZ] = (F32)z_coord;
965
968
LLVector3d global_pos = sim_info->getGlobalPos (local_pos);
966
969
trackLocation (global_pos);
967
- setDefaultBtn (" Teleport " );
970
+ mTrackCtrlsPanel -> setDefaultBtn (mTeleportButton );
968
971
}
969
972
else
970
973
{
@@ -1375,11 +1378,11 @@ void LLFloaterWorldMap::updateSearchEnabled()
1375
1378
if (childHasKeyboardFocus (" location" ) &&
1376
1379
mLocationEditor ->getValue ().asString ().length () > 0 )
1377
1380
{
1378
- setDefaultBtn (" DoSearch " );
1381
+ mTrackCtrlsPanel -> setDefaultBtn (mSearchButton );
1379
1382
}
1380
1383
else
1381
1384
{
1382
- setDefaultBtn (NULL );
1385
+ mTrackCtrlsPanel -> setDefaultBtn (nullptr );
1383
1386
}
1384
1387
}
1385
1388
@@ -1800,7 +1803,7 @@ void LLFloaterWorldMap::onCommitSearchResult()
1800
1803
1801
1804
mLocationEditor ->setValue (sim_name);
1802
1805
trackLocation (pos_global);
1803
- setDefaultBtn (" Teleport " );
1806
+ mTrackCtrlsPanel -> setDefaultBtn (mTeleportButton );
1804
1807
break ;
1805
1808
}
1806
1809
}
0 commit comments