summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Bell <josh@lindenlab.com>2007-01-23 22:50:48 +0000
committerJosh Bell <josh@lindenlab.com>2007-01-23 22:50:48 +0000
commit787ac69d75dbbd8ad79c32a5de54603351523eae (patch)
tree3151d0fec47c13424b6a4b534d2a219e2904e9f3
parent7f50e28b0f3905f95299f7d5d63e0fd82e103bed (diff)
svn merge -r 57026:57058 svn+ssh://svn.lindenlab.com/svn/linden/branches/maintenance
-rw-r--r--indra/newview/llpanelavatar.cpp31
1 files changed, 24 insertions, 7 deletions
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp
index f671d63557..9b1a6caf0e 100644
--- a/indra/newview/llpanelavatar.cpp
+++ b/indra/newview/llpanelavatar.cpp
@@ -829,14 +829,17 @@ void LLPanelAvatarClassified::enableControls(BOOL self)
BOOL LLPanelAvatarClassified::titleIsValid()
{
LLTabContainerCommon* tabs = LLViewerUICtrlFactory::getTabContainerByName(this, "classified tab");
- for (S32 i = 0; i < tabs->getTabCount(); i++)
+ if ( tabs )
{
- LLPanelClassified* panel = (LLPanelClassified*)tabs->getPanelByIndex(i);
- if ( ! panel->titleIsValid() )
+ LLPanelClassified* panel = (LLPanelClassified*)tabs->getCurrentPanel();
+ if ( panel )
{
- return FALSE;
- }
- }
+ if ( ! panel->titleIsValid() )
+ {
+ return FALSE;
+ };
+ };
+ };
return TRUE;
}
@@ -1640,7 +1643,8 @@ void LLPanelAvatar::onClickOK(void *userdata)
{
self->sendAvatarPropertiesUpdate();
- if ( self->mPanelClassified->titleIsValid() )
+ LLTabContainerCommon* tabs = LLUICtrlFactory::getTabContainerByName(self,"tab");
+ if ( tabs->getCurrentPanel() != self->mPanelClassified )
{
self->mPanelClassified->apply();
@@ -1650,6 +1654,19 @@ void LLPanelAvatar::onClickOK(void *userdata)
infop->close();
}
}
+ else
+ {
+ if ( self->mPanelClassified->titleIsValid() )
+ {
+ self->mPanelClassified->apply();
+
+ LLFloaterAvatarInfo *infop = LLFloaterAvatarInfo::getInstance(self->mAvatarID);
+ if (infop)
+ {
+ infop->close();
+ }
+ }
+ }
}
}