From 9b4f54c826ffa4f94efa866068c9d6ecdfb4b424 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:44:48 -0500 Subject: Second Life viewer sources 1.13.2.15 --- linden/indra/newview/llpanelavatar.cpp | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) (limited to 'linden/indra/newview/llpanelavatar.cpp') diff --git a/linden/indra/newview/llpanelavatar.cpp b/linden/indra/newview/llpanelavatar.cpp index d54f16b..8ba33a9 100644 --- a/linden/indra/newview/llpanelavatar.cpp +++ b/linden/indra/newview/llpanelavatar.cpp @@ -848,14 +848,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; } @@ -1659,7 +1662,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(); @@ -1669,6 +1673,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(); + } + } + } } } -- cgit v1.1