From c8726aba303bcf1207b730a344536e25491420bc Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 10 Nov 2015 09:48:56 -0500 Subject: remove execute permission from many files that should not have it --- indra/newview/llfloaterregioninfo.cpp | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 indra/newview/llfloaterregioninfo.cpp (limited to 'indra/newview/llfloaterregioninfo.cpp') diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp old mode 100755 new mode 100644 -- cgit v1.2.3 From ca5026c60db679c6ee4f64f460bcc96c0ad03e2e Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Tue, 26 Jan 2016 09:34:03 +0200 Subject: MAINT-6082 Value checks for Viewer terrain Elevation Ranges --- indra/newview/llfloaterregioninfo.cpp | 57 +++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) (limited to 'indra/newview/llfloaterregioninfo.cpp') diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 16566bea73..df5b226d98 100755 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -1184,6 +1184,22 @@ BOOL LLPanelRegionTerrainInfo::validateTextureSizes() return TRUE; } +BOOL LLPanelRegionTerrainInfo::validateTextureHeights() +{ + for (S32 i = 0; i < CORNER_COUNT; ++i) + { + std::string low = llformat("height_start_spin_%d", i); + std::string high = llformat("height_range_spin_%d", i); + + if (getChild(low)->getValue().asReal() > getChild(high)->getValue().asReal()) + { + return FALSE; + } + } + + return TRUE; +} + ///////////////////////////////////////////////////////////////////////////// // LLPanelRegionTerrainInfo ///////////////////////////////////////////////////////////////////////////// @@ -1216,6 +1232,9 @@ BOOL LLPanelRegionTerrainInfo::postBuild() childSetAction("upload_raw_btn", onClickUploadRaw, this); childSetAction("bake_terrain_btn", onClickBakeTerrain, this); + mAskedTextureHeights = false; + mConfirmedTextureHeights = false; + return LLPanelRegionInfo::postBuild(); } @@ -1298,6 +1317,21 @@ BOOL LLPanelRegionTerrainInfo::sendUpdate() return FALSE; } + // Check if terrain Elevation Ranges are correct + if (gSavedSettings.getBOOL("RegionCheckTextureHeights") && !validateTextureHeights()) + { + if (!mAskedTextureHeights) + { + LLNotificationsUtil::add("ConfirmTextureHeights", LLSD(), LLSD(), boost::bind(&LLPanelRegionTerrainInfo::callbackTextureHeights, this, _1, _2)); + mAskedTextureHeights = true; + return FALSE; + } + else if (!mConfirmedTextureHeights) + { + return FALSE; + } + } + LLTextureCtrl* texture_ctrl; std::string id_str; LLMessageSystem* msg = gMessageSystem; @@ -1338,6 +1372,29 @@ BOOL LLPanelRegionTerrainInfo::sendUpdate() return TRUE; } +bool LLPanelRegionTerrainInfo::callbackTextureHeights(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (option == 0) // ok + { + mConfirmedTextureHeights = true; + } + else if (option == 1) // cancel + { + mConfirmedTextureHeights = false; + } + else if (option == 2) // don't ask + { + gSavedSettings.setBOOL("RegionCheckTextureHeights", FALSE); + mConfirmedTextureHeights = true; + } + + onBtnSet(); + + mAskedTextureHeights = false; + return false; +} + // static void LLPanelRegionTerrainInfo::onClickDownloadRaw(void* data) { -- cgit v1.2.3 From 200f7dedf258ec7cbbe2266fce6a189386df7249 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 17 Feb 2016 11:56:21 +0200 Subject: MAINT-6142 Assorted viewer crashes when viewer is in a disconnected state & certain floaters are opened. --- indra/newview/llfloaterregioninfo.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'indra/newview/llfloaterregioninfo.cpp') 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("Experiences"); } +void LLFloaterRegionInfo::disableTabCtrls() +{ + LLTabContainer* tab = getChild("region_panels"); + tab->getChild("General")->setCtrlsEnabled(FALSE); + tab->getChild("Debug")->setCtrlsEnabled(FALSE); + tab->getChild("Terrain")->setCtrlsEnabled(FALSE); + tab->getChild("panel_env_info")->setCtrlsEnabled(FALSE); + tab->getChild("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(); -- cgit v1.2.3