diff options
author | Sergei Litovchuk <slitovchuk@productengine.com> | 2010-02-23 16:57:39 +0200 |
---|---|---|
committer | Sergei Litovchuk <slitovchuk@productengine.com> | 2010-02-23 16:57:39 +0200 |
commit | ef5e9472d3e767b32d807cb178e99d7117455b24 (patch) | |
tree | d25601cf9717c32a5b24529756f6a3906d039081 /indra | |
parent | 44333983a6f623a05d7eb31fda087f04741449d9 (diff) |
Fixed normal bug (EXT-5554) 'Land for Sale' icon should always be visible.
- Made 'Land for Sale' icon visible in Navigation bar even if "Show Parcel Properties" is off.
--HG--
branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/lllocationinputctrl.cpp | 26 |
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); |