summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpanelgroup.cpp23
-rw-r--r--indra/newview/llpanelgrouplandmoney.cpp9
-rw-r--r--indra/newview/llpanelgrouplandmoney.h2
-rw-r--r--indra/newview/llsidetray.cpp11
4 files changed, 33 insertions, 12 deletions
diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp
index f9e93a1d38..5ed7821b1b 100644
--- a/indra/newview/llpanelgroup.cpp
+++ b/indra/newview/llpanelgroup.cpp
@@ -329,6 +329,8 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id)
{
std::string str_group_id;
group_id.toString(str_group_id);
+
+ bool is_same_id = group_id == mID;
LLGroupMgr::getInstance()->removeObserver(this);
mID = group_id;
@@ -397,16 +399,19 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id)
getChild<LLUICtrl>("group_name")->setVisible(false);
getChild<LLUICtrl>("group_name_editor")->setVisible(true);
}
- else
+ else
{
- if(!tab_general->getDisplayChildren())
- tab_general->changeOpenClose(tab_general->getDisplayChildren());
- if(!tab_roles->getDisplayChildren())
- tab_roles->changeOpenClose(tab_roles->getDisplayChildren());
- if(!tab_notices->getDisplayChildren())
- tab_notices->changeOpenClose(tab_notices->getDisplayChildren());
- if(!tab_land->getDisplayChildren())
- tab_land->changeOpenClose(tab_land->getDisplayChildren());
+ if(!is_same_id)
+ {
+ if(!tab_general->getDisplayChildren())
+ tab_general->changeOpenClose(tab_general->getDisplayChildren());
+ if(tab_roles->getDisplayChildren())
+ tab_roles->changeOpenClose(tab_roles->getDisplayChildren());
+ if(tab_notices->getDisplayChildren())
+ tab_notices->changeOpenClose(tab_notices->getDisplayChildren());
+ if(tab_land->getDisplayChildren())
+ tab_land->changeOpenClose(tab_land->getDisplayChildren());
+ }
tab_roles->canOpenClose(true);
tab_notices->canOpenClose(true);
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);
}
diff --git a/indra/newview/llpanelgrouplandmoney.h b/indra/newview/llpanelgrouplandmoney.h
index 0f275ea9a8..7e08d26d6f 100644
--- a/indra/newview/llpanelgrouplandmoney.h
+++ b/indra/newview/llpanelgrouplandmoney.h
@@ -60,6 +60,8 @@ public:
static void processGroupAccountSummaryReply(LLMessageSystem* msg, void** data);
virtual void setGroupID(const LLUUID& id);
+
+ virtual void onLandSelectionChanged();
protected:
class impl;
diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp
index 2be0aa40d2..4db849c159 100644
--- a/indra/newview/llsidetray.cpp
+++ b/indra/newview/llsidetray.cpp
@@ -427,7 +427,16 @@ void LLSideTray::createButtons ()
void LLSideTray::onTabButtonClick(string name)
{
-
+ LLSideTrayTab* side_bar = getTab(name);
+
+ if(side_bar == mActiveTab)
+ {
+ if(mCollapsed)
+ expandSideBar();
+ else
+ collapseSideBar();
+ return;
+ }
selectTabByName (name);
if(mCollapsed)
expandSideBar();