Merging revisions 2036-2042 of https://svn.aws.productengine.com/secondlife/pe/stable-2 into P:\svn\viewer-2.0.0, respecting ancestry

* Bug Fixes: EXT-1542 EXT-1540 EXT-1529 EXT-1539
meow-7.2.2
Steven Bennetts 2009-10-18 22:42:55 +00:00
parent 1404ab0bde
commit 4ee757b45d
4 changed files with 33 additions and 12 deletions

View File

@ -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);

View File

@ -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);
}

View File

@ -60,6 +60,8 @@ public:
static void processGroupAccountSummaryReply(LLMessageSystem* msg, void** data);
virtual void setGroupID(const LLUUID& id);
virtual void onLandSelectionChanged();
protected:
class impl;

View File

@ -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();