diff options
author | Alexander Gavriliuk <alexandrgproductengine@lindenlab.com> | 2023-10-07 15:16:07 +0200 |
---|---|---|
committer | Alexander Gavriliuk <alexandrgproductengine@lindenlab.com> | 2023-10-08 14:01:05 +0200 |
commit | e7f1466a7b7a26ab7e3ff113a85e2b533f6ee941 (patch) | |
tree | ed709498a0fba4d9c04dbd61fc73466b5a535bf0 /indra/llui/llview.h | |
parent | 2465470817957c8378e81ec1a7e32551fbac7b26 (diff) | |
parent | 13fe9744d7fb005ec37c05eae70e9bb2c518cb88 (diff) |
Merge branch main into DRTVWR-489
Diffstat (limited to 'indra/llui/llview.h')
-rw-r--r-- | indra/llui/llview.h | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 7360fd0fb9..3d52d3048f 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -111,7 +111,7 @@ public: Alternative<std::string> string; Alternative<U32> flags; - Follows(); + Follows(); }; struct Params : public LLInitParam::Block<Params> @@ -658,8 +658,8 @@ public: // Draw debug rectangles around widgets to help with alignment and spacing static bool sDebugRects; - static bool sIsRectDirty; - static LLRect sDirtyRect; + static bool sIsRectDirty; + static LLRect sDirtyRect; // Draw widget names and sizes when drawing debug rectangles, turning this // off is useful to make the rectangles themselves easier to see. @@ -702,20 +702,16 @@ template <class T> T* LLView::getChild(const std::string& name, BOOL recurse) co if (!result) { result = LLUICtrlFactory::getDefaultWidget<T>(name); - - if (result) - { - // *NOTE: You cannot call mFoo = getChild<LLFoo>("bar") - // in a floater or panel constructor. The widgets will not - // be ready. Instead, put it in postBuild(). - LL_WARNS() << "Making dummy " << typeid(T).name() << " named \"" << name << "\" in " << getName() << LL_ENDL; - } - else + if (!result) { - LL_WARNS() << "Failed to create dummy " << typeid(T).name() << LL_ENDL; - return NULL; + LL_ERRS() << "Failed to create dummy " << typeid(T).name() << LL_ENDL; } + // *NOTE: You cannot call mFoo = getChild<LLFoo>("bar") + // in a floater or panel constructor. The widgets will not + // be ready. Instead, put it in postBuild(). + LL_WARNS() << "Making dummy " << typeid(T).name() << " named \"" << name << "\" in " << getName() << LL_ENDL; + getDefaultWidgetContainer().addChild(result); } } |