summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatersocial.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2013-08-07 16:12:29 -0700
committerMerov Linden <merov@lindenlab.com>2013-08-07 16:12:29 -0700
commit9167198312ac98f02640ecc3c445fa721413febd (patch)
tree982317aa4a4a1c96ee4f3a3067a890d0083fa911 /indra/newview/llfloatersocial.cpp
parent3e08ccf6abb6f6ca7f1fa2fc6e80fd6589203f28 (diff)
ACME-814 : Disable Post in Photo panel while the preview is processing
Diffstat (limited to 'indra/newview/llfloatersocial.cpp')
-rw-r--r--indra/newview/llfloatersocial.cpp5
1 files changed, 4 insertions, 1 deletions
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();
}