Skip to content
Snippets Groups Projects
Commit ef5f9ee8 authored by Jonathan Yap's avatar Jonathan Yap
Browse files

STORM-466 Fix for: minimap cannot be reset to default zoom

parent 91021bf9
No related branches found
No related tags found
No related merge requests found
...@@ -288,7 +288,16 @@ void LLFloaterMap::handleZoom(const LLSD& userdata) ...@@ -288,7 +288,16 @@ void LLFloaterMap::handleZoom(const LLSD& userdata)
std::string level = userdata.asString(); std::string level = userdata.asString();
F32 scale = 0.0f; 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; scale = LLNetMap::MAP_SCALE_MAX;
else if (level == std::string("medium")) else if (level == std::string("medium"))
scale = LLNetMap::MAP_SCALE_MID; scale = LLNetMap::MAP_SCALE_MID;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
top="724" top="724"
visible="false" visible="false"
width="128"> width="128">
<menu_item_call <menu_item_call
label="Zoom Close" label="Zoom Close"
name="Zoom Close"> name="Zoom Close">
<menu_item_call.on_click <menu_item_call.on_click
...@@ -29,7 +29,14 @@ ...@@ -29,7 +29,14 @@
function="Minimap.Zoom" function="Minimap.Zoom"
parameter="far" /> parameter="far" />
</menu_item_call> </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 <menu_item_check
label="Rotate Map" label="Rotate Map"
name="Rotate Map"> name="Rotate Map">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment