summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatermodelpreview.cpp
diff options
context:
space:
mode:
authorleyla_linden <none@none>2010-12-10 17:05:38 -0800
committerleyla_linden <none@none>2010-12-10 17:05:38 -0800
commit285ba513368c6b692ea2eb5d13b85300c76adbea (patch)
tree97edcc2260d97f7b80c9172338481eb8e2a05503 /indra/newview/llfloatermodelpreview.cpp
parent52686947e2643eaa0f1cda03f33bbf1089d3b46d (diff)
fixed model uploader aspect not updating, text not following resize, and file name not filling in
Diffstat (limited to 'indra/newview/llfloatermodelpreview.cpp')
-rw-r--r--indra/newview/llfloatermodelpreview.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 0cfebdb399..9aa8e62885 100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -287,7 +287,6 @@ BOOL LLFloaterModelPreview::postBuild()
mModelPreview = new LLModelPreview(512, 512, this);
mModelPreview->setPreviewTarget(16.f);
- mModelPreview->setAspect((F32) mPreviewRect.getWidth()/mPreviewRect.getHeight());
//set callbacks for left click on line editor rows
for (U32 i = 0; i <= LLModel::LOD_HIGH; i++)
@@ -3363,8 +3362,12 @@ BOOL LLModelPreview::render()
F32 explode = mFMP->childGetValue("physics_explode").asReal();
glClear(GL_DEPTH_BUFFER_BIT);
+
+ LLRect preview_rect = mFMP->getChildView("preview_panel")->getRect();
+ F32 aspect = (F32) preview_rect.getWidth()/preview_rect.getHeight();
+
+ LLViewerCamera::getInstance()->setAspect(aspect);
- LLViewerCamera::getInstance()->setAspect(mAspect);
LLViewerCamera::getInstance()->setView(LLViewerCamera::getInstance()->getDefaultFOV() / mCameraZoom);
LLVector3 offset = mCameraOffset;