From cacaf21eb5657065dc510bf245cf5fddb4f48a19 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Fri, 5 Dec 2014 09:46:07 -0500 Subject: STORM-2088 Minimap no longer remembers zoom setting between sessions --- indra/newview/llnetmap.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview/llnetmap.cpp') diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 1685a18e26..fbd9b127b6 100755 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -97,13 +97,13 @@ LLNetMap::LLNetMap (const Params & p) mToolTipMsg(), mPopupMenu(NULL) { + mScale = gSavedSettings.getF32("MiniMapScale"); + mPixelsPerMeter = mScale / REGION_WIDTH_METERS; mDotRadius = llmax(DOT_SCALE * mPixelsPerMeter, MIN_DOT_RADIUS); - setScale(gSavedSettings.getF32("MiniMapScale")); } LLNetMap::~LLNetMap() { - gSavedSettings.setF32("MiniMapScale", mScale); } BOOL LLNetMap::postBuild() @@ -138,6 +138,8 @@ void LLNetMap::setScale( F32 scale ) mPixelsPerMeter = mScale / REGION_WIDTH_METERS; mDotRadius = llmax(DOT_SCALE * mPixelsPerMeter, MIN_DOT_RADIUS); + gSavedSettings.setF32("MiniMapScale", mScale); + mUpdateNow = true; } -- cgit v1.2.3