summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelgrouplandmoney.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelgrouplandmoney.cpp')
-rw-r--r--indra/newview/llpanelgrouplandmoney.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/indra/newview/llpanelgrouplandmoney.cpp b/indra/newview/llpanelgrouplandmoney.cpp
index e40fa19bb6..9023afc602 100644
--- a/indra/newview/llpanelgrouplandmoney.cpp
+++ b/indra/newview/llpanelgrouplandmoney.cpp
@@ -690,7 +690,7 @@ BOOL LLPanelGroupLandMoney::postBuild()
if ( mImplementationp->mGroupParcelsp )
{
- mImplementationp->mGroupParcelsp->setCommitCallback(boost::bind(&LLButton::setEnabled, mImplementationp->mMapButtonp, true));
+ mImplementationp->mGroupParcelsp->setCommitCallback(boost::bind(&LLPanelGroupLandMoney::onLandSelectionChanged, this));
mImplementationp->mGroupParcelsp->setCommitOnSelectionChange(true);
}
@@ -808,6 +808,11 @@ BOOL LLPanelGroupLandMoney::postBuild()
return LLPanelGroupTab::postBuild();
}
+void LLPanelGroupLandMoney::onLandSelectionChanged()
+{
+ mImplementationp->mMapButtonp->setEnabled( mImplementationp->mGroupParcelsp->getItemCount() > 0 );
+}
+
BOOL LLPanelGroupLandMoney::isVisibleByAgent(LLAgent* agentp)
{
return mAllowEdit && agentp->isInGroup(mGroupID);
@@ -1493,7 +1498,7 @@ void LLPanelGroupLandMoney::setGroupID(const LLUUID& id)
if ( mImplementationp->mGroupParcelsp )
{
- mImplementationp->mGroupParcelsp->setCommitCallback(boost::bind(&LLButton::setEnabled, mImplementationp->mMapButtonp, true));
+ mImplementationp->mGroupParcelsp->setCommitCallback(boost::bind(&LLPanelGroupLandMoney::onLandSelectionChanged, this));
mImplementationp->mGroupParcelsp->setCommitOnSelectionChange(true);
}