aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpreviewtexture.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llpreviewtexture.cpp26
1 files changed, 13 insertions, 13 deletions
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()
200 if (!isMinimized()) 200 if (!isMinimized())
201 { 201 {
202 LLGLSUIDefault gls_ui; 202 LLGLSUIDefault gls_ui;
203 LLGLSNoTexture gls_notex; 203 gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
204 204
205 const LLRect& border = mClientRect; 205 const LLRect& border = mClientRect;
206 LLRect interior = mClientRect; 206 LLRect interior = mClientRect;
@@ -299,20 +299,20 @@ BOOL LLPreviewTexture::canSaveAs() const
299// virtual 299// virtual
300void LLPreviewTexture::saveAs() 300void LLPreviewTexture::saveAs()
301{ 301{
302 if( !mLoadingFullImage ) 302 if( mLoadingFullImage ) return;
303
304 LLFilePicker& file_picker = LLFilePicker::instance();
305 if( !file_picker.getSaveFile( LLFilePicker::FFSAVE_TGA, LLDir::getScrubbedFileName(getItem()->getName())) )
303 { 306 {
304 LLFilePicker& file_picker = LLFilePicker::instance(); 307 // User canceled or we failed to acquire save file.
305 if( !file_picker.getSaveFile( LLFilePicker::FFSAVE_TGA ) ) 308 return;
306 {
307 // User canceled save.
308 return;
309 }
310 mSaveFileName = file_picker.getFirstFile();
311 mLoadingFullImage = TRUE;
312 getWindow()->incBusyCount();
313 mImage->setLoadedCallback( LLPreviewTexture::onFileLoadedForSave,
314 0, TRUE, FALSE, new LLUUID( mItemUUID ) );
315 } 309 }
310 // remember the user-approved/edited file name.
311 mSaveFileName = file_picker.getFirstFile();
312 mLoadingFullImage = TRUE;
313 getWindow()->incBusyCount();
314 mImage->setLoadedCallback( LLPreviewTexture::onFileLoadedForSave,
315 0, TRUE, FALSE, new LLUUID( mItemUUID ) );
316} 316}
317 317
318 318