From 969220f3246a1e2bbb5efe594971e5ff41f517a1 Mon Sep 17 00:00:00 2001 From: Nicky Date: Thu, 6 Oct 2016 00:07:21 +0200 Subject: [PATCH] FIRE-20112; Delay grid initialization until grid manager is ready. --- indra/newview/fsgridhandler.cpp | 14 ++++++++++++++ indra/newview/fsgridhandler.h | 1 + 2 files changed, 15 insertions(+) diff --git a/indra/newview/fsgridhandler.cpp b/indra/newview/fsgridhandler.cpp index efb0bc3c96..da65f03dbd 100644 --- a/indra/newview/fsgridhandler.cpp +++ b/indra/newview/fsgridhandler.cpp @@ -193,6 +193,12 @@ void LLGridManager::initGrids() { initCmdLineGrids(); } + + // FIRE-20112 in case grid was set bt settings/cmd line, set it now + if( mStartupGrid.size() ) + setGridChoice( mStartupGrid ); + mStartupGrid = ""; + // } @@ -1052,6 +1058,14 @@ void LLGridManager::setGridChoice(const std::string& grid) return; } + // FIRE-20112 viewer is not properly initialized yet, store grid choice and call this method again later. + if( mGridList.size() == 0 ) + { + mStartupGrid = grid; + return; + } + // + // Set the grid choice based on a string. // The string can be: // - a grid label from the gGridInfo table diff --git a/indra/newview/fsgridhandler.h b/indra/newview/fsgridhandler.h index 9424787f57..a78dcae79f 100644 --- a/indra/newview/fsgridhandler.h +++ b/indra/newview/fsgridhandler.h @@ -290,6 +290,7 @@ protected: std::string mGrid; std::string mGridFile; + std::string mStartupGrid; LLSD mGridList; // LLSD mConnectedGrid;