From 5ed91b504b0796fc7358ada1489f8112f325133f Mon Sep 17 00:00:00 2001 From: Cinders <cinder@cinderblocks.biz> Date: Wed, 5 Aug 2015 19:46:55 -0600 Subject: [PATCH] ALCH-259 - Readd Edit Terrain checkbox to parcel options --- indra/newview/llfloaterland.cpp | 13 ++++++++++++- indra/newview/llfloaterland.h | 1 + .../skins/default/xui/en/floater_about_land.xml | 15 ++++++++++++--- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 9f41965105..d8fefa68e5 100755 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -1838,6 +1838,7 @@ LLPanelLandOptions::LLPanelLandOptions(LLParcelSelectionHandle& parcel) mCheckEditGroupObjects(NULL), mCheckAllObjectEntry(NULL), mCheckGroupObjectEntry(NULL), + mCheckEditLand(NULL), mCheckSafe(NULL), mCheckFly(NULL), mCheckGroupScripts(NULL), @@ -1871,6 +1872,9 @@ BOOL LLPanelLandOptions::postBuild() mCheckGroupObjectEntry = getChild<LLCheckBoxCtrl>( "group object entry check"); mCheckGroupObjectEntry->setCommitCallback(boost::bind(&LLPanelLandOptions::onCommitAny, this)); + mCheckEditLand = getChild<LLCheckBoxCtrl>( "edit land check"); + mCheckEditLand->setCommitCallback(boost::bind(&LLPanelLandOptions::onCommitAny, this)); + mCheckGroupScripts = getChild<LLCheckBoxCtrl>( "check group scripts"); mCheckGroupScripts->setCommitCallback(boost::bind(&LLPanelLandOptions::onCommitAny, this)); @@ -1968,6 +1972,9 @@ void LLPanelLandOptions::refresh() mCheckGroupObjectEntry ->set(FALSE); mCheckGroupObjectEntry ->setEnabled(FALSE); + + mCheckEditLand ->set(FALSE); + mCheckEditLand ->setEnabled(FALSE); mCheckSafe ->set(FALSE); mCheckSafe ->setEnabled(FALSE); @@ -2017,6 +2024,10 @@ void LLPanelLandOptions::refresh() mCheckGroupObjectEntry ->set( parcel->getAllowGroupObjectEntry() || parcel->getAllowAllObjectEntry()); mCheckGroupObjectEntry ->setEnabled( can_change_options && !parcel->getAllowAllObjectEntry() ); + BOOL can_change_terraform = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_EDIT); + mCheckEditLand ->set( parcel->getAllowTerraform() ); + mCheckEditLand ->setEnabled( can_change_terraform ); + mCheckSafe ->set( !parcel->getAllowDamage() ); mCheckSafe ->setEnabled( can_change_options ); @@ -2239,7 +2250,7 @@ void LLPanelLandOptions::onCommitAny() BOOL create_group_objects = mCheckEditGroupObjects->get() || mCheckEditObjects->get(); BOOL all_object_entry = mCheckAllObjectEntry->get(); BOOL group_object_entry = mCheckGroupObjectEntry->get() || mCheckAllObjectEntry->get(); - BOOL allow_terraform = false; // removed from UI so always off now - mCheckEditLand->get(); + BOOL allow_terraform = mCheckEditLand->get(); BOOL allow_damage = !mCheckSafe->get(); BOOL allow_fly = mCheckFly->get(); BOOL allow_landmark = TRUE; // cannot restrict landmark creation diff --git a/indra/newview/llfloaterland.h b/indra/newview/llfloaterland.h index 2602728b6c..d3bb3a5498 100755 --- a/indra/newview/llfloaterland.h +++ b/indra/newview/llfloaterland.h @@ -331,6 +331,7 @@ private: LLCheckBoxCtrl* mCheckEditGroupObjects; LLCheckBoxCtrl* mCheckAllObjectEntry; LLCheckBoxCtrl* mCheckGroupObjectEntry; + LLCheckBoxCtrl* mCheckEditLand; LLCheckBoxCtrl* mCheckSafe; LLCheckBoxCtrl* mCheckFly; LLCheckBoxCtrl* mCheckGroupScripts; diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml index 6a7a2fda55..fb0920de6d 100755 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -1227,17 +1227,26 @@ Only large parcels can be listed in search. left="20" name="allow_label0" width="150"> - Fly: + Everyone: </text> - <check_box + <check_box height="16" - label="Everyone" + label="Fly" layout="topleft" name="check fly" tool_tip="If checked, Residents can fly on your land. If unchecked, they can only fly into and over your land." left_pad="2" width="130" /> + <check_box + height="16" + label="Edit Terrain" + layout="topleft" + left_pad="2" + name="edit land check" + tool_tip="If checked, anyone can terraform your land. It is best to leave this unchecked, as you can always edit your own land." + top_delta="0" + width="130" /> <text type="string" length="1" -- GitLab