From c8e90833207674515a545a4cf539bc9d78236ad2 Mon Sep 17 00:00:00 2001
From: NiranV <NiranV.Dean@googlemail.com>
Date: Thu, 14 Aug 2014 03:21:58 +0200
Subject: BUG-6958: Fixed: Snapshot position is always <0,0,0>. onIdle isn't
 called as much as they thought it is, it's only called when "Auto refresh" is
 on but not on normal manual snapshot refreshes.

---
 indra/newview/llsnapshotlivepreview.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp
index 8ad9ca000c..1aa7041175 100644
--- a/indra/newview/llsnapshotlivepreview.cpp
+++ b/indra/newview/llsnapshotlivepreview.cpp
@@ -195,6 +195,8 @@ void LLSnapshotLivePreview::updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail
 		mSnapshotDelayTimer.start();
 		mSnapshotDelayTimer.setTimerExpirySec(delay);
         
+		mPosTakenGlobal = gAgentCamera.getCameraPositionGlobal();
+
         // Tell the floater container that the snapshot is in the process of updating itself
         if (mViewContainer)
         {
@@ -760,7 +762,6 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
                     curr_preview_image->setFilteringOption(previewp->getSnapshotType() == SNAPSHOT_TEXTURE ? LLTexUnit::TFO_ANISOTROPIC : LLTexUnit::TFO_POINT);
                     curr_preview_image->setAddressMode(LLTexUnit::TAM_CLAMP);
 
-                    previewp->mPosTakenGlobal = gAgentCamera.getCameraPositionGlobal();
                     previewp->mShineCountdown = 4; // wait a few frames to avoid animation glitch due to readback this frame
                 }
             }
-- 
cgit v1.2.3