From 09c7d38166e3f5d04ed6321b2ac06c4112bb858b Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Sat, 18 Dec 2010 16:44:51 -0500 Subject: STORM-467 Fix for minimap zoom does not persist to the next session --- indra/newview/llfloatermap.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/newview/llfloatermap.cpp') diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp index 351b9ac5da..da32467423 100644 --- a/indra/newview/llfloatermap.cpp +++ b/indra/newview/llfloatermap.cpp @@ -83,7 +83,6 @@ LLFloaterMap::~LLFloaterMap() BOOL LLFloaterMap::postBuild() { mMap = getChild("Net Map"); - mMap->setScale(gSavedSettings.getF32("MiniMapScale")); mMap->setToolTipMsg(getString("ToolTipMsg")); sendChildToBack(mMap); @@ -296,7 +295,6 @@ void LLFloaterMap::handleZoom(const LLSD& userdata) scale = LLNetMap::MAP_SCALE_MIN; if (scale != 0.0f) { - gSavedSettings.setF32("MiniMapScale", scale ); mMap->setScale(scale); } } -- cgit v1.2.3 From ef5f9ee893bd9840bf3b043ece654a6e786d5170 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Wed, 22 Dec 2010 08:47:43 -0500 Subject: STORM-466 Fix for: minimap cannot be reset to default zoom --- indra/newview/llfloatermap.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfloatermap.cpp') 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; -- cgit v1.2.3