diff options
Diffstat (limited to 'indra/newview/llpreviewtexture.cpp')
-rw-r--r-- | indra/newview/llpreviewtexture.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
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 ) ); } |