diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index 51d63f89ca..35333d5426 100755
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -829,13 +829,14 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL
LL_DEBUGS() << "Loading typed res from panel " << spanel->getName() << LL_ENDL;
new_width = spanel->getTypedPreviewWidth();
new_height = spanel->getTypedPreviewHeight();
-
+ // FIRE-15794. Back out MAINT-4341 FIXED Pixel width and height of the preview is not matched to value of Width or Height text-box in the ?Snapshot to inventory? window
+ // Because having cropped snapshots of UI is worse than having mismatched values.
// Limit custom size for inventory snapshots to 512x512 px.
- if (getActiveSnapshotType(view) == LLSnapshotLivePreview::SNAPSHOT_TEXTURE)
- {
- new_width = llmin(new_width, MAX_TEXTURE_SIZE);
- new_height = llmin(new_height, MAX_TEXTURE_SIZE);
- }
+ //if (getActiveSnapshotType(view) == LLSnapshotLivePreview::SNAPSHOT_TEXTURE)
+ //{
+ // new_width = llmin(new_width, MAX_TEXTURE_SIZE);
+ // new_height = llmin(new_height, MAX_TEXTURE_SIZE);
+ //}*/
}
else
{
@@ -873,11 +874,13 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL
{
getWidthSpinner(view)->setValue(width);
getHeightSpinner(view)->setValue(height);
- if (getActiveSnapshotType(view) == LLSnapshotLivePreview::SNAPSHOT_TEXTURE)
- {
- getWidthSpinner(view)->setIncrement(width >> 1);
- getHeightSpinner(view)->setIncrement(height >> 1);
- }
+ // FIRE-15794. Back out MAINT-4341 FIXED Pixel width and height of the preview is not matched to value of Width or Height text-box in the ?Snapshot to inventory? window
+ // Because having cropped snapshots of UI is worse than having mismatched values.
+ //if (getActiveSnapshotType(view) == LLSnapshotLivePreview::SNAPSHOT_TEXTURE)
+ //{
+ // getWidthSpinner(view)->setIncrement(width >> 1);
+ // getHeightSpinner(view)->setIncrement(height >> 1);
+ //}*/
}
// Store settings at logout; Only update spinners when using custom resolution
}
@@ -1003,11 +1006,13 @@ void LLFloaterSnapshot::Impl::setImageSizeSpinnersValues(LLFloaterSnapshot *view
{
getWidthSpinner(view)->forceSetValue(width);
getHeightSpinner(view)->forceSetValue(height);
- if (getActiveSnapshotType(view) == LLSnapshotLivePreview::SNAPSHOT_TEXTURE)
- {
- getWidthSpinner(view)->setIncrement(width >> 1);
- getHeightSpinner(view)->setIncrement(height >> 1);
- }
+ // FIRE-15794. Back out MAINT-4341 FIXED Pixel width and height of the preview is not matched to value of Width or Height text-box in the ?Snapshot to inventory? window
+ // Because having cropped snapshots of UI is worse than having mismatched values.
+ //if (getActiveSnapshotType(view) == LLSnapshotLivePreview::SNAPSHOT_TEXTURE)
+ //{
+ // getWidthSpinner(view)->setIncrement(width >> 1);
+ // getHeightSpinner(view)->setIncrement(height >> 1);
+ //}*/
}
// static
diff --git a/indra/newview/llpanelsnapshot.cpp b/indra/newview/llpanelsnapshot.cpp
index 149faf7b90..47a50d344a 100755
--- a/indra/newview/llpanelsnapshot.cpp
+++ b/indra/newview/llpanelsnapshot.cpp
@@ -39,18 +39,20 @@
const S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512
-S32 power_of_two(S32 sz, S32 upper)
-{
- S32 res = upper;
- while( upper >= sz)
- {
- res = upper;
- upper >>= 1;
- }
- return res;
-}
+// FIRE-15794. Back out MAINT-4341 FIXED Pixel width and height of the preview is not matched to value of Width or Height text-box in the ?Snapshot to inventory? window
+ // Because having cropped snapshots of UI is worse than having mismatched values.
+//S32 power_of_two(S32 sz, S32 upper)
+//{
+// S32 res = upper;
+// while( upper >= sz)
+// {
+// res = upper;
+// upper >>= 1;
+// }
+// return res;
+//}
-// virtual
+// virtual
BOOL LLPanelSnapshot::postBuild()
{
getChild(getImageSizeComboName())->setCommitCallback(boost::bind(&LLPanelSnapshot::onResolutionComboCommit, this, _1));
@@ -191,26 +193,30 @@ void LLPanelSnapshot::cancel()
void LLPanelSnapshot::onCustomResolutionCommit()
{
LLSD info;
- LLSpinCtrl *widthSpinner = getChild(getWidthSpinnerName());
- LLSpinCtrl *heightSpinner = getChild(getHeightSpinnerName());
- if (getName() == "panel_snapshot_inventory")
- {
- S32 width = widthSpinner->getValue().asInteger();
- width = power_of_two(width, MAX_TEXTURE_SIZE);
- info["w"] = width;
- widthSpinner->setIncrement(width >> 1);
- widthSpinner->forceSetValue(width);
- S32 height = heightSpinner->getValue().asInteger();
- height = power_of_two(height, MAX_TEXTURE_SIZE);
- heightSpinner->setIncrement(height >> 1);
- heightSpinner->forceSetValue(height);
- info["h"] = height;
- }
- else
- {
- info["w"] = widthSpinner->getValue().asInteger();
- info["h"] = heightSpinner->getValue().asInteger();
- }
+ info["w"] = getChild(getWidthSpinnerName())->getValue().asInteger();
+ info["h"] = getChild(getHeightSpinnerName())->getValue().asInteger();
+ // FIRE-15794. Back out MAINT-4341 FIXED Pixel width and height of the preview is not matched to value of Width or Height text-box in the ?Snapshot to inventory? window
+ // Because having cropped snapshots of UI is worse than having mismatched values.
+ //LLSpinCtrl *widthSpinner = getChild(getWidthSpinnerName());
+ //LLSpinCtrl *heightSpinner = getChild(getHeightSpinnerName());
+ //if (getName() == "panel_snapshot_inventory")
+ //{
+ // S32 width = widthSpinner->getValue().asInteger();
+ // width = power_of_two(width, MAX_TEXTURE_SIZE);
+ // info["w"] = width;
+ // widthSpinner->setIncrement(width >> 1);
+ // widthSpinner->forceSetValue(width);
+ // S32 height = heightSpinner->getValue().asInteger();
+ // height = power_of_two(height, MAX_TEXTURE_SIZE);
+ // heightSpinner->setIncrement(height >> 1);
+ // heightSpinner->forceSetValue(height);
+ // info["h"] = height;
+ //}
+ //else
+ //{
+ // info["w"] = widthSpinner->getValue().asInteger();
+ // info["h"] = heightSpinner->getValue().asInteger();
+ //}
LLFloaterSnapshot::getInstance()->notify(LLSD().with("custom-res-change", info));
}