diff options
| author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2022-09-01 15:12:14 +0100 |
|---|---|---|
| committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2022-09-01 15:12:14 +0100 |
| commit | 3c3442cbbc38beff1ab82ffcc7f81390c7979361 (patch) | |
| tree | b2e60cc8818e372706a2c3463ca2a2f255066b79 /indra/newview/llinventorylistitem.cpp | |
| parent | 2c692f635da67990f842f20adf3b42d870d42fdf (diff) | |
| parent | ce685a12b9acc888a39c336c91ae6272db74ce91 (diff) | |
Merge branch 'DRTVWR-559' of https://bitbucket.org/lindenlab/viewer into DRTVWR-559
Diffstat (limited to 'indra/newview/llinventorylistitem.cpp')
| -rw-r--r-- | indra/newview/llinventorylistitem.cpp | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/indra/newview/llinventorylistitem.cpp b/indra/newview/llinventorylistitem.cpp index 12bb609df8..de6a850b57 100644 --- a/indra/newview/llinventorylistitem.cpp +++ b/indra/newview/llinventorylistitem.cpp @@ -298,31 +298,41 @@ LLPanelInventoryListItemBase::LLPanelInventoryListItemBase(LLViewerInventoryItem applyXUILayout(icon_params, this); mIconCtrl = LLUICtrlFactory::create<LLIconCtrl>(icon_params); - if (mIconCtrl) - { - addChild(mIconCtrl); - } - else + if (!mIconCtrl) { LLIconCtrl::Params icon_params; icon_params.name = "item_icon"; mIconCtrl = LLUICtrlFactory::create<LLIconCtrl>(icon_params); } + if (mIconCtrl) + { + addChild(mIconCtrl); + } + else + { + LL_ERRS() << "Failed to create mIconCtrl" << LL_ENDL; + } + LLTextBox::Params text_params(params.item_name); applyXUILayout(text_params, this); mTitleCtrl = LLUICtrlFactory::create<LLTextBox>(text_params); - if (mTitleCtrl) + if (!mTitleCtrl) { - addChild(mTitleCtrl); - } - else - { - LLTextBox::Params text_aprams; + LLTextBox::Params text_params; text_params.name = "item_title"; mTitleCtrl = LLUICtrlFactory::create<LLTextBox>(text_params); } + + if (mTitleCtrl) + { + addChild(mTitleCtrl); + } + else + { + LL_ERRS() << "Failed to create mTitleCtrl" << LL_ENDL; + } } class WidgetVisibilityChanger |
