diff options
author | Rye Mutt <rye@alchemyviewer.org> | 2024-07-24 17:45:01 -0400 |
---|---|---|
committer | Rye Mutt <rye@alchemyviewer.org> | 2024-07-25 08:45:53 -0400 |
commit | 0a420e7d9ab54162a04472c756a3994b6597445d (patch) | |
tree | bee1a41626fc8662126297a4b8961c9f4d50c9ec /indra/newview | |
parent | 7e82c1de5242e7dacafe7d69abb753f6fe528e0f (diff) |
Fix find child during draw in texture picker
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/lltexturectrl.cpp | 4 | ||||
-rw-r--r-- | indra/newview/lltexturectrl.h | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index e154777aef..35057a910a 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -558,6 +558,7 @@ bool LLFloaterTexturePicker::postBuild() mResolutionLabel = getChild<LLTextBox>("size_lbl"); mResolutionWarning = getChild<LLTextBox>("over_limit_lbl"); + mPreviewWidget = getChild<LLView>("preview_widget"); mDefaultBtn = getChild<LLButton>("Default"); mNoneBtn = getChild<LLButton>("None"); @@ -653,7 +654,6 @@ void LLFloaterTexturePicker::draw() bool valid_dims = updateImageStats(); // if we're inactive, gray out "apply immediate" checkbox - getChildView("show_folders_check")->setEnabled(mActive && mCanApplyImmediately && !mNoCopyTextureSelected); mSelectBtn->setEnabled(mActive && mCanApply && valid_dims); mPipetteBtn->setEnabled(mActive); mPipetteBtn->setValue(LLToolMgr::getInstance()->getCurrentTool() == LLToolPipette::getInstance()); @@ -731,7 +731,7 @@ void LLFloaterTexturePicker::draw() } // Border - LLRect border = getChildView("preview_widget")->getRect(); + LLRect border = mPreviewWidget->getRect(); gl_rect_2d( border, LLColor4::black, false ); diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h index 3c6cff4eaa..df5e763139 100644 --- a/indra/newview/lltexturectrl.h +++ b/indra/newview/lltexturectrl.h @@ -437,6 +437,7 @@ protected: LLButton* mPipetteBtn; LLButton* mSelectBtn; LLButton* mCancelBtn; + LLView* mPreviewWidget = nullptr; private: bool mCanApply; |