diff options
author | Paul ProductEngine <pguslisty@productengine.com> | 2011-06-28 21:53:19 +0300 |
---|---|---|
committer | Paul ProductEngine <pguslisty@productengine.com> | 2011-06-28 21:53:19 +0300 |
commit | 25fa0e79c7832e2e3b1aaa8079396098c8aa8fe8 (patch) | |
tree | 3a00dc0ca21bf4e602fba73f9de29a35429bec15 /indra/newview/llfloatermodelpreview.cpp | |
parent | 3b05866653606c247827747b0e767cd1a2545ac8 (diff) | |
parent | 0528723d0fcd926e2243d543aa51bf5261f09103 (diff) |
merge
Diffstat (limited to 'indra/newview/llfloatermodelpreview.cpp')
-rw-r--r-- | indra/newview/llfloatermodelpreview.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 0006e3423b..d000248e8e 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -544,6 +544,13 @@ void LLFloaterModelPreview::loadModel(S32 lod) (new LLMeshFilePicker(mModelPreview, lod))->getFile(); } +void LLFloaterModelPreview::loadModel(S32 lod, const std::string& file_name) +{ + mModelPreview->mLoading = true; + + mModelPreview->loadModel(file_name, lod); +} + //static void LLFloaterModelPreview::onImportScaleCommit(LLUICtrl*,void* userdata) { @@ -4751,7 +4758,18 @@ BOOL LLModelPreview::render() glClear(GL_DEPTH_BUFFER_BIT); - LLRect preview_rect = mFMP->getChildView("preview_panel")->getRect(); + LLRect preview_rect; + + LLFloaterModelWizard* floater_wizard = dynamic_cast<LLFloaterModelWizard*>(mFMP); + if (floater_wizard) + { + preview_rect = floater_wizard->getPreviewRect(); + } + else + { + preview_rect = mFMP->getChildView("preview_panel")->getRect(); + } + F32 aspect = (F32) preview_rect.getWidth()/preview_rect.getHeight(); LLViewerCamera::getInstance()->setAspect(aspect); |