From 9167198312ac98f02640ecc3c445fa721413febd Mon Sep 17 00:00:00 2001
From: Merov Linden <merov@lindenlab.com>
Date: Wed, 7 Aug 2013 16:12:29 -0700
Subject: ACME-814 : Disable Post in Photo panel while the preview is
 processing

---
 indra/newview/llfloatersocial.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/llfloatersocial.cpp b/indra/newview/llfloatersocial.cpp
index 59db93f4b2..937f76648d 100644
--- a/indra/newview/llfloatersocial.cpp
+++ b/indra/newview/llfloatersocial.cpp
@@ -205,8 +205,8 @@ void LLSocialPhotoPanel::draw()
 { 
 	LLSnapshotLivePreview * previewp = static_cast<LLSnapshotLivePreview *>(mPreviewHandle.get());
 
+    // Enable interaction only if no transaction with the service is on-going (prevent duplicated posts)
     bool no_ongoing_connection = !(LLFacebookConnect::instance().isTransactionOngoing());
-    mPostButton->setEnabled(no_ongoing_connection);
     mCancelButton->setEnabled(no_ongoing_connection);
     mCaptionTextBox->setEnabled(no_ongoing_connection);
     mResolutionComboBox->setEnabled(no_ongoing_connection);
@@ -247,6 +247,9 @@ void LLSocialPhotoPanel::draw()
     // Update the visibility of the working (computing preview) label
     mWorkingLabel->setVisible(!(previewp && previewp->getSnapshotUpToDate()));
     
+    // Enable Post if we have a preview to send and no on going connection being processed
+    mPostButton->setEnabled(no_ongoing_connection && (previewp && previewp->getSnapshotUpToDate()));
+    
     // Draw the rest of the panel on top of it
 	LLPanel::draw();
 }
-- 
cgit v1.2.3