From 361a2277733a0afaf61f6c6150f1933d2e5aceb7 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 29 Oct 2009 16:12:12 -0600 Subject: fix EXT-1661: Avatars' icons should be cached only once per 24 hours, but not every time the viewer is restarted. to be reviewed by steve. --- indra/llui/lliconctrl.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'indra/llui/lliconctrl.cpp') diff --git a/indra/llui/lliconctrl.cpp b/indra/llui/lliconctrl.cpp index 66c2ba682f..82ffac9580 100644 --- a/indra/llui/lliconctrl.cpp +++ b/indra/llui/lliconctrl.cpp @@ -57,7 +57,9 @@ LLIconCtrl::LLIconCtrl(const LLIconCtrl::Params& p) : LLUICtrl(p), mColor(p.color()), mImagep(p.image), - mPriority(0) + mPriority(0), + mDrawWidth(0), + mDrawHeight(0) { if (mImagep.notNull()) { @@ -100,6 +102,8 @@ void LLIconCtrl::setValue(const LLSD& value ) { mImagep = LLUI::getUIImage(tvalue.asString(), mPriority); } + + setIconImageDrawSize(); } std::string LLIconCtrl::getImageName() const @@ -109,3 +113,14 @@ std::string LLIconCtrl::getImageName() const else return std::string(); } + +void LLIconCtrl::setIconImageDrawSize() +{ + if(mImagep.notNull() && mDrawWidth && mDrawHeight) + { + if(mImagep->getImage().notNull()) + { + mImagep->getImage()->setKnownDrawSize(mDrawWidth, mDrawHeight) ; + } + } +} \ No newline at end of file -- cgit v1.2.3 From 1f3212b68087269397d5c5e33acbc1e70c13ee44 Mon Sep 17 00:00:00 2001 From: CG Linden Date: Sat, 31 Oct 2009 04:25:48 -0700 Subject: Add missing eol --- indra/llui/lliconctrl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/llui/lliconctrl.cpp') diff --git a/indra/llui/lliconctrl.cpp b/indra/llui/lliconctrl.cpp index 82ffac9580..b1bd2b89a9 100644 --- a/indra/llui/lliconctrl.cpp +++ b/indra/llui/lliconctrl.cpp @@ -123,4 +123,5 @@ void LLIconCtrl::setIconImageDrawSize() mImagep->getImage()->setKnownDrawSize(mDrawWidth, mDrawHeight) ; } } -} \ No newline at end of file +} + -- cgit v1.2.3