summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterregioninfo.cpp
diff options
context:
space:
mode:
authorMnikolenko ProductEngine <mnikolenko@productengine.com>2016-02-17 11:56:21 +0200
committerMnikolenko ProductEngine <mnikolenko@productengine.com>2016-02-17 11:56:21 +0200
commit200f7dedf258ec7cbbe2266fce6a189386df7249 (patch)
treed6bf78ea03f23838bcb37d94b7c5217f559715d2 /indra/newview/llfloaterregioninfo.cpp
parentfb487d9270e1fc433ae23319df4cabf989319c37 (diff)
MAINT-6142 Assorted viewer crashes when viewer is in a disconnected state & certain floaters are opened.
Diffstat (limited to 'indra/newview/llfloaterregioninfo.cpp')
-rwxr-xr-xindra/newview/llfloaterregioninfo.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index df5b226d98..bbde0baa8f 100755
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -232,6 +232,11 @@ BOOL LLFloaterRegionInfo::postBuild()
panel->buildFromFile("panel_region_debug.xml");
mTab->addTabPanel(panel);
+ if(gDisconnected)
+ {
+ return TRUE;
+ }
+
if(!gAgent.getRegion()->getCapability("RegionExperiences").empty())
{
panel = new LLPanelRegionExperiences;
@@ -255,6 +260,11 @@ LLFloaterRegionInfo::~LLFloaterRegionInfo()
void LLFloaterRegionInfo::onOpen(const LLSD& key)
{
+ if(gDisconnected)
+ {
+ disableTabCtrls();
+ return;
+ }
refreshFromRegion(gAgent.getRegion());
requestRegionInfo();
requestMeshRezInfo();
@@ -478,7 +488,16 @@ LLPanelRegionExperiences* LLFloaterRegionInfo::getPanelExperiences()
return (LLPanelRegionExperiences*)tab->getChild<LLPanel>("Experiences");
}
+void LLFloaterRegionInfo::disableTabCtrls()
+{
+ LLTabContainer* tab = getChild<LLTabContainer>("region_panels");
+ tab->getChild<LLPanel>("General")->setCtrlsEnabled(FALSE);
+ tab->getChild<LLPanel>("Debug")->setCtrlsEnabled(FALSE);
+ tab->getChild<LLPanel>("Terrain")->setCtrlsEnabled(FALSE);
+ tab->getChild<LLPanel>("panel_env_info")->setCtrlsEnabled(FALSE);
+ tab->getChild<LLPanel>("Estate")->setCtrlsEnabled(FALSE);
+}
void LLFloaterRegionInfo::onTabSelected(const LLSD& param)
{
@@ -3129,6 +3148,11 @@ bool LLPanelEnvironmentInfo::refreshFromRegion(LLViewerRegion* region)
void LLPanelEnvironmentInfo::refresh()
{
+ if(gDisconnected)
+ {
+ return;
+ }
+
populateWaterPresetsList();
populateSkyPresetsList();
populateDayCyclesList();