diff options
Diffstat (limited to 'indra/newview/llpanelavatar.cpp')
-rw-r--r-- | indra/newview/llpanelavatar.cpp | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index b013befca5..6f812e9e35 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -824,6 +824,20 @@ void LLPanelAvatarClassified::enableControls(BOOL self) { } +BOOL LLPanelAvatarClassified::titleIsValid() +{ + LLTabContainerCommon* tabs = LLViewerUICtrlFactory::getTabContainerByName(this, "classified tab"); + for (S32 i = 0; i < tabs->getTabCount(); i++) + { + LLPanelClassified* panel = (LLPanelClassified*)tabs->getPanelByIndex(i); + if ( ! panel->titleIsValid() ) + { + return FALSE; + } + } + + return TRUE; +} void LLPanelAvatarClassified::apply() { @@ -1624,12 +1638,15 @@ void LLPanelAvatar::onClickOK(void *userdata) { self->sendAvatarPropertiesUpdate(); - self->mPanelClassified->apply(); - - LLFloaterAvatarInfo *infop = LLFloaterAvatarInfo::getInstance(self->mAvatarID); - if (infop) + if ( self->mPanelClassified->titleIsValid() ) { - infop->close(); + self->mPanelClassified->apply(); + + LLFloaterAvatarInfo *infop = LLFloaterAvatarInfo::getInstance(self->mAvatarID); + if (infop) + { + infop->close(); + } } } } |