diff options
author | Merov Linden <merov@lindenlab.com> | 2014-01-30 18:53:05 -0800 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2014-01-30 18:53:05 -0800 |
commit | e970fa7f1ce9190b8a26e72bebbcceed04fb7494 (patch) | |
tree | e59c616660b9ce7e0c9fad5384d37422438fbf61 /indra/newview/llsnapshotlivepreview.cpp | |
parent | c7c755b82e736050a514792a4c4bbdee9bf981d3 (diff) |
ACME-1293 : Use notification to signal from the snapshot panel to its container rather than grabbing global instances, use unique control_name for widgets, fix Post button visibility on Twitter
Diffstat (limited to 'indra/newview/llsnapshotlivepreview.cpp')
-rw-r--r-- | indra/newview/llsnapshotlivepreview.cpp | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index 9e982459ba..60ef0fddd4 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -94,7 +94,8 @@ LLSnapshotLivePreview::LLSnapshotLivePreview (const LLSnapshotLivePreview::Param mSnapshotActive(FALSE), mSnapshotBufferType(LLViewerWindow::SNAPSHOT_TYPE_COLOR), mFilterName(""), - mAllowRenderUI(TRUE) + mAllowRenderUI(TRUE), + mViewContainer(NULL) { setSnapshotQuality(gSavedSettings.getS32("SnapshotQuality")); mSnapshotDelayTimer.setTimerExpirySec(0.0f); @@ -189,13 +190,14 @@ void LLSnapshotLivePreview::updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail // Stop shining animation. mShineAnimTimer.stop(); - mSnapshotDelayTimer.start(); mSnapshotDelayTimer.setTimerExpirySec(delay); - LLFloaterSnapshot::preUpdate(); - LLFloaterFacebook::preUpdate(); - LLFloaterFlickr::preUpdate(); - LLFloaterTwitter::preUpdate(); + + // Tell the floater container that the snapshot is in the process of updating itself + if (mViewContainer) + { + mViewContainer->notify(LLSD().with("snapshot-updating", true)); + } } // Update thumbnail if requested. @@ -731,10 +733,12 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) { previewp->generateThumbnailImage() ; } - LLFloaterSnapshot::postUpdate(); - LLFloaterFacebook::postUpdate(); - LLFloaterFlickr::postUpdate(); - LLFloaterTwitter::postUpdate(); + + // Tell the floater container that the snapshot is updated now + if (previewp->mViewContainer) + { + previewp->mViewContainer->notify(LLSD().with("snapshot-updated", true)); + } return TRUE; } |