From 7aca8ad6b83be2d260b26bd5d27ff36ec7786cff Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 11 Sep 2012 15:55:36 -0500 Subject: MAINT-1534 Fix for calls to find widgets getting out of hand. --- indra/newview/llchathistory.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'indra/newview/llchathistory.cpp') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 84e73e96fa..3e1fa1e49b 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -110,7 +110,9 @@ public: mFrom(), mSessionID(), mMinUserNameWidth(0), - mUserNameFont(NULL) + mUserNameFont(NULL), + mUserNameTextBox(NULL), + mTimeBoxTextBox(NULL) {} static LLChatHistoryHeader* createInstance(const std::string& file_name) @@ -187,6 +189,9 @@ public: setMouseEnterCallback(boost::bind(&LLChatHistoryHeader::showInfoCtrl, this)); setMouseLeaveCallback(boost::bind(&LLChatHistoryHeader::hideInfoCtrl, this)); + mUserNameTextBox = getChild("user_name"); + mTimeBoxTextBox = getChild("time_box"); + return LLPanel::postBuild(); } @@ -377,8 +382,8 @@ public: /*virtual*/ void draw() { - LLTextBox* user_name = getChild("user_name"); - LLTextBox* time_box = getChild("time_box"); + LLTextBox* user_name = mUserNameTextBox; //getChild("user_name"); + LLTextBox* time_box = mTimeBoxTextBox; //getChild("time_box"); LLRect user_name_rect = user_name->getRect(); S32 user_name_width = user_name_rect.getWidth(); @@ -568,6 +573,8 @@ protected: S32 mMinUserNameWidth; const LLFontGL* mUserNameFont; + LLTextBox* mUserNameTextBox; + LLTextBox* mTimeBoxTextBox; }; LLUICtrl* LLChatHistoryHeader::sInfoCtrl = NULL; -- cgit v1.2.3