From aaf4428fad7796417934dbc9c6ccf2b01ab285d3 Mon Sep 17 00:00:00 2001 From: NiranV Date: Sat, 9 Aug 2014 02:14:01 +0200 Subject: STORM-2066: Fixed: Selecting a resolution dropdown bigger than the maximum window resolution with toggled "Show UI in Snapshot" freezes the Viewer. --- indra/newview/llfloatersnapshot.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview/llfloatersnapshot.cpp') diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index beb06c4162..f927b50092 100755 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -758,6 +758,12 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL S32 original_width = 0 , original_height = 0 ; previewp->getSize(original_width, original_height) ; + if (gSavedSettings.getBOOL("RenderUIInSnapshot") || gSavedSettings.getBOOL("RenderHUDInSnapshot")) + { //clamp snapshot resolution to window size when showing UI or HUD in snapshot + width = llmin(width, gViewerWindow->getWindowWidthRaw()); + height = llmin(height, gViewerWindow->getWindowHeightRaw()); + } + if (width == 0 || height == 0) { // take resolution from current window size @@ -803,12 +809,6 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL checkAspectRatio(view, width) ; previewp->getSize(width, height); - - if (gSavedSettings.getBOOL("RenderUIInSnapshot") || gSavedSettings.getBOOL("RenderHUDInSnapshot")) - { //clamp snapshot resolution to window size when showing UI or HUD in snapshot - width = llmin(width, gViewerWindow->getWindowWidthRaw()); - height = llmin(height, gViewerWindow->getWindowHeightRaw()); - } updateSpinners(view, previewp, width, height, TRUE); // may change width and height -- cgit v1.2.3