diff options
author | Oz Linden <oz@lindenlab.com> | 2011-03-21 06:59:55 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2011-03-21 06:59:55 -0400 |
commit | cb47ae3264f3d9d22add17f2cbc5699c8620705f (patch) | |
tree | c426adad23154cb74711a78174c412ab2a2b8034 /indra/newview/llnetmap.cpp | |
parent | 2cddf137e3c785dc9efbe7e12b90d239d8eaa958 (diff) | |
parent | 8e0ea2fb7271b6d559ec751d47eb8b2992d4611d (diff) |
merge changes for storm-971
Diffstat (limited to 'indra/newview/llnetmap.cpp')
-rw-r--r-- | indra/newview/llnetmap.cpp | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 81b3c49906..981b4dbee3 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -894,23 +894,29 @@ BOOL LLNetMap::handleClick(S32 x, S32 y, MASK mask) BOOL LLNetMap::handleDoubleClick(S32 x, S32 y, MASK mask) { LLVector3d pos_global = viewPosToGlobal(x, y); - - // If we're not tracking a beacon already, double-click will set one - if (!LLTracker::isTracking(NULL)) + + bool double_click_teleport = gSavedSettings.getBOOL("DoubleClickTeleport"); + bool double_click_show_world_map = gSavedSettings.getBOOL("DoubleClickShowWorldMap"); + + if (double_click_teleport || double_click_show_world_map) { - LLFloaterWorldMap* world_map = LLFloaterWorldMap::getInstance(); - if (world_map) + // If we're not tracking a beacon already, double-click will set one + if (!LLTracker::isTracking(NULL)) { - world_map->trackLocation(pos_global); + LLFloaterWorldMap* world_map = LLFloaterWorldMap::getInstance(); + if (world_map) + { + world_map->trackLocation(pos_global); + } } } - - if (gSavedSettings.getBOOL("DoubleClickTeleport")) + + if (double_click_teleport) { // If DoubleClickTeleport is on, double clicking the minimap will teleport there gAgent.teleportViaLocationLookAt(pos_global); } - else + else if (double_click_show_world_map) { LLFloaterReg::showInstance("world_map"); } |