summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatersocial.cpp
diff options
context:
space:
mode:
authorGilbert Gonzales <gilbert@lindenlab.com>2013-06-28 15:23:29 -0700
committerGilbert Gonzales <gilbert@lindenlab.com>2013-06-28 15:23:29 -0700
commitdc16f52a28b1c9d6d276d818bc0a92a060dc0708 (patch)
treea242fdf7e7c4483aabe347ba1b7f84f400084e25 /indra/newview/llfloatersocial.cpp
parenta32522b99a9e9f98a689f07344f4fad0fc221d06 (diff)
parent1c7a7fe2d1c3f9399a6248551b7b2a8a7e68afdd (diff)
merge
Diffstat (limited to 'indra/newview/llfloatersocial.cpp')
-rw-r--r--indra/newview/llfloatersocial.cpp48
1 files changed, 25 insertions, 23 deletions
diff --git a/indra/newview/llfloatersocial.cpp b/indra/newview/llfloatersocial.cpp
index d6c00b7c86..4660644969 100644
--- a/indra/newview/llfloatersocial.cpp
+++ b/indra/newview/llfloatersocial.cpp
@@ -246,20 +246,32 @@ LLSnapshotLivePreview* LLSocialPhotoPanel::getPreviewView()
void LLSocialPhotoPanel::onVisibilityChange(const LLSD& new_visibility)
{
bool visible = new_visibility.asBoolean();
- if (visible && !mPreviewHandle.get())
+ if (visible)
{
- LLRect full_screen_rect = getRootView()->getRect();
- LLSnapshotLivePreview::Params p;
- p.rect(full_screen_rect);
- LLSnapshotLivePreview* previewp = new LLSnapshotLivePreview(p);
- mPreviewHandle = previewp->getHandle();
-
- previewp->setSnapshotType(previewp->SNAPSHOT_WEB);
- previewp->setSnapshotFormat(LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG);
- //previewp->setSnapshotQuality(98);
- previewp->setThumbnailPlaceholderRect(mThumbnailPlaceholder->getRect());
-
- updateControls();
+ if (mPreviewHandle.get())
+ {
+ LLSnapshotLivePreview* preview = getPreviewView();
+ if(preview)
+ {
+ lldebugs << "opened, updating snapshot" << llendl;
+ preview->updateSnapshot(TRUE);
+ }
+ }
+ else
+ {
+ LLRect full_screen_rect = getRootView()->getRect();
+ LLSnapshotLivePreview::Params p;
+ p.rect(full_screen_rect);
+ LLSnapshotLivePreview* previewp = new LLSnapshotLivePreview(p);
+ mPreviewHandle = previewp->getHandle();
+
+ previewp->setSnapshotType(previewp->SNAPSHOT_WEB);
+ previewp->setSnapshotFormat(LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG);
+ //previewp->setSnapshotQuality(98);
+ previewp->setThumbnailPlaceholderRect(mThumbnailPlaceholder->getRect());
+
+ updateControls();
+ }
}
}
@@ -531,16 +543,6 @@ BOOL LLFloaterSocial::postBuild()
return LLFloater::postBuild();
}
-void LLFloaterSocial::onOpen(const LLSD& key)
-{
- LLSnapshotLivePreview* preview = mSocialPhotoPanel->getPreviewView();
- if(preview)
- {
- lldebugs << "opened, updating snapshot" << llendl;
- preview->updateSnapshot(TRUE);
- }
-}
-
// static
void LLFloaterSocial::preUpdate()
{