From dea3e7623afa69aba983cacb0ecb84efec7ed190 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Wed, 7 Apr 2010 10:26:32 +0300 Subject: Fixed major bug EXT-6534 (Snapshot to Disk with Custom Size, selecting Constrain Proportions causes snapshot of the active window with a background to the correct size but the window the same size as original, instead of proportionally changing the active window size.) * The reason: completely broken functionality to keep all the GUI controls in sync with the saved settings and Preview image state. Issue occurred while upgrading snapshot/social media floater (changeset (1acc14a5e7ac) New snapshot/social media floater) * Fix: added disabling of floater's buttons depend on snapshot is up to date ("Share Snapshot", "Save Snapshot", "Set As Profile Pic", "Share To Web", "Email Snapshot", "Save To My Inventory", "Save To My Computer"). QA Note: other controls should be checked against necessity to disable them while changing snapshot settings. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/181/ --HG-- branch : product-engine --- indra/newview/llfloatersnapshot.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'indra') diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index aae379afe2..cfeaede832 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -1319,7 +1319,27 @@ void LLFloaterSnapshot::Impl::updateLayout(LLFloaterSnapshot* floaterp) // static void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) { + LLSnapshotLivePreview* previewp = getPreviewView(floater); + if (NULL == previewp) + { + return; + } + + // Disable buttons until Snapshot is ready. EXT-6534 + BOOL got_snap = previewp->getSnapshotUpToDate(); + + // process Main buttons + floater->childSetEnabled("share", got_snap); + floater->childSetEnabled("save", got_snap); + floater->childSetEnabled("set_profile_pic", got_snap); + + // process Share actions buttons + floater->childSetEnabled("share_to_web", got_snap); + floater->childSetEnabled("share_to_email", got_snap); + // process Save actions buttons + floater->childSetEnabled("save_to_inventory", got_snap); + floater->childSetEnabled("save_to_computer", got_snap); } // static -- cgit v1.2.3