aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpanelavatar.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llpanelavatar.cpp31
1 files changed, 24 insertions, 7 deletions
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)
848BOOL LLPanelAvatarClassified::titleIsValid() 848BOOL LLPanelAvatarClassified::titleIsValid()
849{ 849{
850 LLTabContainerCommon* tabs = LLViewerUICtrlFactory::getTabContainerByName(this, "classified tab"); 850 LLTabContainerCommon* tabs = LLViewerUICtrlFactory::getTabContainerByName(this, "classified tab");
851 for (S32 i = 0; i < tabs->getTabCount(); i++) 851 if ( tabs )
852 { 852 {
853 LLPanelClassified* panel = (LLPanelClassified*)tabs->getPanelByIndex(i); 853 LLPanelClassified* panel = (LLPanelClassified*)tabs->getCurrentPanel();
854 if ( ! panel->titleIsValid() ) 854 if ( panel )
855 { 855 {
856 return FALSE; 856 if ( ! panel->titleIsValid() )
857 } 857 {
858 } 858 return FALSE;
859 };
860 };
861 };
859 862
860 return TRUE; 863 return TRUE;
861} 864}
@@ -1659,7 +1662,8 @@ void LLPanelAvatar::onClickOK(void *userdata)
1659 { 1662 {
1660 self->sendAvatarPropertiesUpdate(); 1663 self->sendAvatarPropertiesUpdate();
1661 1664
1662 if ( self->mPanelClassified->titleIsValid() ) 1665 LLTabContainerCommon* tabs = LLUICtrlFactory::getTabContainerByName(self,"tab");
1666 if ( tabs->getCurrentPanel() != self->mPanelClassified )
1663 { 1667 {
1664 self->mPanelClassified->apply(); 1668 self->mPanelClassified->apply();
1665 1669
@@ -1669,6 +1673,19 @@ void LLPanelAvatar::onClickOK(void *userdata)
1669 infop->close(); 1673 infop->close();
1670 } 1674 }
1671 } 1675 }
1676 else
1677 {
1678 if ( self->mPanelClassified->titleIsValid() )
1679 {
1680 self->mPanelClassified->apply();
1681
1682 LLFloaterAvatarInfo *infop = LLFloaterAvatarInfo::getInstance(self->mAvatarID);
1683 if (infop)
1684 {
1685 infop->close();
1686 }
1687 }
1688 }
1672 } 1689 }
1673} 1690}
1674 1691