diff options
author | Vadim ProductEngine <vsavchuk@productengine.com> | 2011-12-14 15:26:13 +0200 |
---|---|---|
committer | Vadim ProductEngine <vsavchuk@productengine.com> | 2011-12-14 15:26:13 +0200 |
commit | 82f043c3338fdcf35e42dbe2ed512eb39808b90e (patch) | |
tree | 89e7109d4c730a011b4fb45e6405e466701860a6 /indra | |
parent | 8ba11929456ef471c7916d1b4ac331f4553f2b1d (diff) |
EXP-1639 FIXED Fixed a resolution rounding error.
The error sometimes led to the following issues with maximized viewer window on MS Windows:
* displaying incorrect resolution
* failure to update snapshot
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfloatersnapshot.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 13f544e784..b7145d43f6 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -333,8 +333,7 @@ void LLSnapshotLivePreview::updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail { S32 old_image_index = mCurImageIndex; mCurImageIndex = (mCurImageIndex + 1) % 2; - setWidth(mWidth[old_image_index]); - setHeight(mHeight[old_image_index]); + setSize(mWidth[old_image_index], mHeight[old_image_index]); mFallAnimTimer.start(); } mSnapshotUpToDate = FALSE; @@ -1447,7 +1446,6 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) if (previewp) { - lldebugs << "Setting snapshot type (" << shot_type << "), format (" << shot_format << ")" << llendl; previewp->setSnapshotType(shot_type); previewp->setSnapshotFormat(shot_format); previewp->setSnapshotBufferType(layer_type); @@ -1460,6 +1458,7 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) info["have-snapshot"] = got_snap; current_panel->updateControls(info); } + lldebugs << "finished updating controls" << llendl; } // static @@ -1696,6 +1695,7 @@ void LLFloaterSnapshot::Impl::setFinished(LLFloaterSnapshot* floater, bool finis } } +// Apply a new resolution selected from the given combobox. // static void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL do_update) { @@ -1864,11 +1864,11 @@ BOOL LLFloaterSnapshot::Impl::checkImageSize(LLSnapshotLivePreview* previewp, S3 //change another value proportionally if(isWidthChanged) { - height = (S32)(width / aspect_ratio) ; + height = llround(width / aspect_ratio) ; } else { - width = (S32)(height * aspect_ratio) ; + width = llround(height * aspect_ratio) ; } //bound w/h by the max_value |