diff options
Diffstat (limited to 'indra/newview/llfloaterpostcard.cpp')
-rw-r--r-- | indra/newview/llfloaterpostcard.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/indra/newview/llfloaterpostcard.cpp b/indra/newview/llfloaterpostcard.cpp index e8e9f76912..dd0b1d999c 100644 --- a/indra/newview/llfloaterpostcard.cpp +++ b/indra/newview/llfloaterpostcard.cpp @@ -112,11 +112,14 @@ LLFloaterPostcard* LLFloaterPostcard::showFromSnapshot(LLImageJPEG *jpeg, LLView // Take the images from the caller // It's now our job to clean them up LLFloaterPostcard* instance = LLFloaterReg::showTypedInstance<LLFloaterPostcard>("postcard", LLSD(img->getID())); - - instance->mJPEGImage = jpeg; - instance->mViewerImage = img; - instance->mImageScale = image_scale; - instance->mPosTakenGlobal = pos_taken_global; + + if (instance) // may be 0 if we're in mouselook mode + { + instance->mJPEGImage = jpeg; + instance->mViewerImage = img; + instance->mImageScale = image_scale; + instance->mPosTakenGlobal = pos_taken_global; + } return instance; } @@ -128,6 +131,8 @@ void LLFloaterPostcard::draw() if(!isMinimized() && mViewerImage.notNull() && mJPEGImage.notNull()) { + // Force the texture to be 100% opaque when the floater is focused. + F32 alpha = getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency(); LLRect rect(getRect()); // first set the max extents of our preview @@ -149,7 +154,7 @@ void LLFloaterPostcard::draw() } { gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - gl_rect_2d(rect, LLColor4(0.f, 0.f, 0.f, 1.f)); + gl_rect_2d(rect, LLColor4(0.f, 0.f, 0.f, 1.f) % alpha); rect.stretch(-1); } { @@ -164,7 +169,7 @@ void LLFloaterPostcard::draw() rect.getWidth(), rect.getHeight(), mViewerImage.get(), - LLColor4::white); + LLColor4::white % alpha); } glMatrixMode(GL_TEXTURE); glPopMatrix(); |