summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorJonathan Yap <none@none>2010-12-22 08:47:43 -0500
committerJonathan Yap <none@none>2010-12-22 08:47:43 -0500
commitef5f9ee893bd9840bf3b043ece654a6e786d5170 (patch)
treefffcb4adbaa668ec4aaccbfa85fa0234661a3a92 /indra/newview
parent91021bf905286bcb5ce0f14e19a55b4800a9ce99 (diff)
STORM-466 Fix for: minimap cannot be reset to default zoom
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloatermap.cpp11
-rw-r--r--indra/newview/skins/default/xui/en/menu_mini_map.xml11
2 files changed, 19 insertions, 3 deletions
diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp
index 351b9ac5da..0b629bf0ae 100644
--- a/indra/newview/llfloatermap.cpp
+++ b/indra/newview/llfloatermap.cpp
@@ -288,7 +288,16 @@ void LLFloaterMap::handleZoom(const LLSD& userdata)
std::string level = userdata.asString();
F32 scale = 0.0f;
- if (level == std::string("close"))
+ if (level == std::string("default"))
+ {
+ LLControlVariable *pvar = gSavedSettings.getControl("MiniMapScale");
+ if(pvar)
+ {
+ pvar->resetToDefault();
+ scale = gSavedSettings.getF32("MiniMapScale");
+ }
+ }
+ else if (level == std::string("close"))
scale = LLNetMap::MAP_SCALE_MAX;
else if (level == std::string("medium"))
scale = LLNetMap::MAP_SCALE_MID;
diff --git a/indra/newview/skins/default/xui/en/menu_mini_map.xml b/indra/newview/skins/default/xui/en/menu_mini_map.xml
index 8fe89d3934..ea263d05ce 100644
--- a/indra/newview/skins/default/xui/en/menu_mini_map.xml
+++ b/indra/newview/skins/default/xui/en/menu_mini_map.xml
@@ -8,7 +8,7 @@
top="724"
visible="false"
width="128">
- <menu_item_call
+ <menu_item_call
label="Zoom Close"
name="Zoom Close">
<menu_item_call.on_click
@@ -29,7 +29,14 @@
function="Minimap.Zoom"
parameter="far" />
</menu_item_call>
- <menu_item_separator />
+ <menu_item_call
+ label="Zoom Default"
+ name="Zoom Default">
+ <menu_item_call.on_click
+ function="Minimap.Zoom"
+ parameter="default" />
+ </menu_item_call>
+ <menu_item_separator />
<menu_item_check
label="Rotate Map"
name="Rotate Map">