From 181e48c4422a69c94956977d1f8da05ce6384f7a Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 17 Sep 2014 21:13:18 +0300 Subject: =?UTF-8?q?MAINT-4341=20FIXED=20Pixel=20width=20and=20height=20of?= =?UTF-8?q?=20the=20preview=20is=20not=20matched=20to=20value=20of=20Width?= =?UTF-8?q?=20or=20Height=20text-box=20in=20the=20=E2=80=9CSnapshot=20to?= =?UTF-8?q?=20inventory=E2=80=9D=20window?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- indra/newview/llfloatersnapshot.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'indra/newview/llfloatersnapshot.cpp') diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 8677028942..04329ff66e 100755 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -383,12 +383,20 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) S32 w = gViewerWindow->getWindowWidthRaw(); LL_DEBUGS() << "Initializing width spinner (" << width_ctrl->getName() << "): " << w << LL_ENDL; width_ctrl->setValue(w); + if(getActiveSnapshotType(floater) == LLSnapshotLivePreview::SNAPSHOT_TEXTURE) + { + width_ctrl->setIncrement(w >> 1); + } } if (height_ctrl->getValue().asInteger() == 0) { S32 h = gViewerWindow->getWindowHeightRaw(); LL_DEBUGS() << "Initializing height spinner (" << height_ctrl->getName() << "): " << h << LL_ENDL; height_ctrl->setValue(h); + if(getActiveSnapshotType(floater) == LLSnapshotLivePreview::SNAPSHOT_TEXTURE) + { + height_ctrl->setIncrement(h >> 1); + } } // Clamp snapshot resolution to window size when showing UI or HUD in snapshot. @@ -823,6 +831,11 @@ 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); + } } if(original_width != width || original_height != height) @@ -942,6 +955,11 @@ 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); + } } // static -- cgit v1.2.3