From 7abecb48babe6a6f09bf6692ba55076546cfced9 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Mon, 1 Dec 2008 17:39:58 -0600 Subject: Second Life viewer sources 1.22.0-RC --- linden/indra/newview/llpreviewtexture.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'linden/indra/newview/llpreviewtexture.cpp') diff --git a/linden/indra/newview/llpreviewtexture.cpp b/linden/indra/newview/llpreviewtexture.cpp index 0a204dc..47a2cbc 100644 --- a/linden/indra/newview/llpreviewtexture.cpp +++ b/linden/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.1