Prevent snapshot resolution from going over window size, when showing UI or HUD in snapshots is enabled.

Otherwise snapshots do not have UI/HUD shown, despite enabling RenderUIInSnapshot or RenderHUDInSnapshot.
This commit is contained in:
Lirusaito
2012-02-22 09:23:09 -05:00
parent 81521b98fd
commit 22530cd77e

View File

@@ -1708,7 +1708,7 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL
S32 original_width = 0 , original_height = 0 ;
previewp->getSize(original_width, original_height) ;
if (width == 0 || height == 0)
if (width == 0 || height == 0 || gSavedSettings.getBOOL("RenderUIInSnapshot") || gSavedSettings.getBOOL("RenderHUDInSnapshot"))
{
// take resolution from current window size
previewp->setSize(gViewerWindow->getWindowDisplayWidth(), gViewerWindow->getWindowDisplayHeight());