1. simon_linden
  2. viewer-rabbit

Commits

Steven Bennetts  committed e58b4b9

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

  • Participants
  • Parent commits 494eb66
  • Branches default

Comments (0)

Files changed (4)

File indra/newview/llpanelgroup.cpp

View file
 {
 	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;
 		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);

File indra/newview/llpanelgrouplandmoney.cpp

View file
 
 	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);
 	}
 
 	return LLPanelGroupTab::postBuild();
 }
 
+void LLPanelGroupLandMoney::onLandSelectionChanged()
+{
+	mImplementationp->mMapButtonp->setEnabled( mImplementationp->mGroupParcelsp->getItemCount() > 0 );
+}
+
 BOOL LLPanelGroupLandMoney::isVisibleByAgent(LLAgent* agentp)
 {
 	return mAllowEdit && agentp->isInGroup(mGroupID);
 
 	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);
 	}
 

File indra/newview/llpanelgrouplandmoney.h

View file
 	static void processGroupAccountSummaryReply(LLMessageSystem* msg, void** data);
 
 	virtual void setGroupID(const LLUUID& id);
+
+	virtual void onLandSelectionChanged();
 	
 protected:
 	class impl;

File indra/newview/llsidetray.cpp

View file
 
 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();