diff options
| author | Dave Parks <davep@lindenlab.com> | 2012-09-11 15:55:36 -0500 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2012-09-11 15:55:36 -0500 |
| commit | 7aca8ad6b83be2d260b26bd5d27ff36ec7786cff (patch) | |
| tree | d4858cb0d901fc27130cb60da617227e48a17569 /indra/llui/lltoolbar.cpp | |
| parent | d1c34bff3787c6228b5d89316079011a7f098cfc (diff) | |
MAINT-1534 Fix for calls to find widgets getting out of hand.
Diffstat (limited to 'indra/llui/lltoolbar.cpp')
| -rw-r--r-- | indra/llui/lltoolbar.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index 81ea0ebf0c..63b7e452d2 100644 --- a/indra/llui/lltoolbar.cpp +++ b/indra/llui/lltoolbar.cpp @@ -117,7 +117,8 @@ LLToolBar::LLToolBar(const LLToolBar::Params& p) mButtonEnterSignal(NULL), mButtonLeaveSignal(NULL), mButtonRemoveSignal(NULL), - mDragAndDropTarget(false) + mDragAndDropTarget(false), + mCaretIcon(NULL) { mButtonParams[LLToolBarEnums::BTNTYPE_ICONS_WITH_TEXT] = p.button_icon_and_text; mButtonParams[LLToolBarEnums::BTNTYPE_ICONS_ONLY] = p.button_icon; @@ -830,7 +831,12 @@ void LLToolBar::draw() LLUI::translate((F32)getRect().mLeft, (F32)getRect().mBottom); // Position the caret - LLIconCtrl* caret = getChild<LLIconCtrl>("caret"); + if (!mCaretIcon) + { + mCaretIcon = getChild<LLIconCtrl>("caret"); + } + + LLIconCtrl* caret = mCaretIcon; caret->setVisible(FALSE); if (mDragAndDropTarget && !mButtonCommands.empty()) { |
