From f89f19990cbb9f3f2e7473ac6c159098bdfabec7 Mon Sep 17 00:00:00 2001 From: Mark Palange Date: Fri, 7 Nov 2008 17:51:03 +0000 Subject: QAR-992 Merging revisions 101012-101170,101686-101687 of svn+ssh://svn.lindenlab.com/svn/linden/qa/viewer_combo_1-22-merge into linden/release --- indra/newview/llpreviewtexture.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'indra/newview/llpreviewtexture.cpp') diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index 55bad7fc7d..79b8313352 100644 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -200,7 +200,7 @@ void LLPreviewTexture::draw() if (!isMinimized()) { LLGLSUIDefault gls_ui; - LLGLSNoTexture gls_notex; + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); const LLRect& border = mClientRect; LLRect interior = mClientRect; @@ -299,20 +299,20 @@ BOOL LLPreviewTexture::canSaveAs() const // virtual void LLPreviewTexture::saveAs() { - if( !mLoadingFullImage ) + if( mLoadingFullImage ) return; + + LLFilePicker& file_picker = LLFilePicker::instance(); + if( !file_picker.getSaveFile( LLFilePicker::FFSAVE_TGA, LLDir::getScrubbedFileName(getItem()->getName())) ) { - LLFilePicker& file_picker = LLFilePicker::instance(); - if( !file_picker.getSaveFile( LLFilePicker::FFSAVE_TGA ) ) - { - // User canceled save. - return; - } - mSaveFileName = file_picker.getFirstFile(); - mLoadingFullImage = TRUE; - getWindow()->incBusyCount(); - mImage->setLoadedCallback( LLPreviewTexture::onFileLoadedForSave, - 0, TRUE, FALSE, new LLUUID( mItemUUID ) ); + // User canceled or we failed to acquire save file. + return; } + // remember the user-approved/edited file name. + mSaveFileName = file_picker.getFirstFile(); + mLoadingFullImage = TRUE; + getWindow()->incBusyCount(); + mImage->setLoadedCallback( LLPreviewTexture::onFileLoadedForSave, + 0, TRUE, FALSE, new LLUUID( mItemUUID ) ); } -- cgit v1.2.3