summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiranV <NiranV.Dean@googlemail.com>2014-08-09 02:14:01 +0200
committerNiranV <NiranV.Dean@googlemail.com>2014-08-09 02:14:01 +0200
commitaaf4428fad7796417934dbc9c6ccf2b01ab285d3 (patch)
treed673ff417cd38a6e41836ceb4fb8c79308a5ad00
parentedc1a4efd379d64b2cfda0401800b9ebd0cbb54e (diff)
STORM-2066: Fixed: Selecting a resolution dropdown bigger than the maximum window resolution with toggled "Show UI in Snapshot" freezes the Viewer.
-rwxr-xr-xindra/newview/llfloatersnapshot.cpp12
1 files changed, 6 insertions, 6 deletions
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