summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYchebotarev ProductEngine <ychebotarev@productengine.com>2010-02-23 18:05:32 +0200
committerYchebotarev ProductEngine <ychebotarev@productengine.com>2010-02-23 18:05:32 +0200
commit3300c5b8002d8fbad4d6c0c3682b56c9ed79b2b6 (patch)
tree5574329c1c9853cdaee4229f54c88868646c7ffa
parenta8165dfe59771962963e8a807b129c04a74f6d59 (diff)
parentef5e9472d3e767b32d807cb178e99d7117455b24 (diff)
merge
--HG-- branch : product-engine
-rw-r--r--indra/newview/lllocationinputctrl.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp
index a9ead36a70..f8f9ea7379 100644
--- a/indra/newview/lllocationinputctrl.cpp
+++ b/indra/newview/lllocationinputctrl.cpp
@@ -788,15 +788,19 @@ void LLLocationInputCtrl::refreshParcelIcons()
// Our "cursor" moving right to left
S32 x = mAddLandmarkBtn->getRect().mLeft;
- if (gSavedSettings.getBOOL("NavBarShowParcelProperties"))
- {
- LLViewerParcelMgr* vpm = LLViewerParcelMgr::getInstance();
+ LLViewerParcelMgr* vpm = LLViewerParcelMgr::getInstance();
+
+ LLViewerRegion* agent_region = gAgent.getRegion();
+ LLParcel* agent_parcel = vpm->getAgentParcel();
+ if (!agent_region || !agent_parcel)
+ return;
+
+ mForSaleBtn->setVisible(vpm->canAgentBuyParcel(agent_parcel, false));
- LLViewerRegion* agent_region = gAgent.getRegion();
- LLParcel* agent_parcel = vpm->getAgentParcel();
- if (!agent_region || !agent_parcel)
- return;
+ x = layout_widget(mForSaleBtn, x);
+ if (gSavedSettings.getBOOL("NavBarShowParcelProperties"))
+ {
LLParcel* current_parcel;
LLViewerRegion* selection_region = vpm->getSelectionRegion();
LLParcel* selected_parcel = vpm->getParcelSelection()->getParcel();
@@ -816,7 +820,6 @@ void LLLocationInputCtrl::refreshParcelIcons()
current_parcel = agent_parcel;
}
- bool allow_buy = vpm->canAgentBuyParcel(current_parcel, false);
bool allow_voice = vpm->allowAgentVoice(agent_region, current_parcel);
bool allow_fly = vpm->allowAgentFly(agent_region, current_parcel);
bool allow_push = vpm->allowAgentPush(agent_region, current_parcel);
@@ -825,7 +828,6 @@ void LLLocationInputCtrl::refreshParcelIcons()
bool allow_damage = vpm->allowAgentDamage(agent_region, current_parcel);
// Most icons are "block this ability"
- mForSaleBtn->setVisible(allow_buy);
mParcelIcon[VOICE_ICON]->setVisible( !allow_voice );
mParcelIcon[FLY_ICON]->setVisible( !allow_fly );
mParcelIcon[PUSH_ICON]->setVisible( !allow_push );
@@ -833,11 +835,10 @@ void LLLocationInputCtrl::refreshParcelIcons()
mParcelIcon[SCRIPTS_ICON]->setVisible( !allow_scripts );
mParcelIcon[DAMAGE_ICON]->setVisible( allow_damage );
mDamageText->setVisible(allow_damage);
-
- x = layout_widget(mForSaleBtn, x);
+
// Padding goes to left of both landmark star and for sale btn
x -= mAddLandmarkHPad;
-
+
// Slide the parcel icons rect from right to left, adjusting rectangles
for (S32 i = 0; i < ICON_COUNT; ++i)
{
@@ -849,7 +850,6 @@ void LLLocationInputCtrl::refreshParcelIcons()
}
else
{
- mForSaleBtn->setVisible(false);
for (S32 i = 0; i < ICON_COUNT; ++i)
{
mParcelIcon[i]->setVisible(false);