diff options
Diffstat (limited to 'linden/indra/newview/llpreviewtexture.cpp')
-rw-r--r-- | linden/indra/newview/llpreviewtexture.cpp | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/linden/indra/newview/llpreviewtexture.cpp b/linden/indra/newview/llpreviewtexture.cpp index 0a204dc..82331b5 100644 --- a/linden/indra/newview/llpreviewtexture.cpp +++ b/linden/indra/newview/llpreviewtexture.cpp | |||
@@ -4,7 +4,7 @@ | |||
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | 5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ |
6 | * | 6 | * |
7 | * Copyright (c) 2002-2008, Linden Research, Inc. | 7 | * Copyright (c) 2002-2009, Linden Research, Inc. |
8 | * | 8 | * |
9 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
10 | * The source code in this file ("Source Code") is provided by Linden Lab | 10 | * The source code in this file ("Source Code") is provided by Linden Lab |
@@ -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,21 @@ BOOL LLPreviewTexture::canSaveAs() const | |||
299 | // virtual | 299 | // virtual |
300 | void LLPreviewTexture::saveAs() | 300 | void LLPreviewTexture::saveAs() |
301 | { | 301 | { |
302 | if( !mLoadingFullImage ) | 302 | if( mLoadingFullImage ) return; |
303 | |||
304 | LLFilePicker& file_picker = LLFilePicker::instance(); | ||
305 | const LLViewerInventoryItem* item = getItem() ; | ||
306 | if( !file_picker.getSaveFile( LLFilePicker::FFSAVE_TGA, item ? LLDir::getScrubbedFileName(item->getName()) : LLStringUtil::null) ) | ||
303 | { | 307 | { |
304 | LLFilePicker& file_picker = LLFilePicker::instance(); | 308 | // User canceled or we failed to acquire save file. |
305 | if( !file_picker.getSaveFile( LLFilePicker::FFSAVE_TGA ) ) | 309 | 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 | } | 310 | } |
311 | // remember the user-approved/edited file name. | ||
312 | mSaveFileName = file_picker.getFirstFile(); | ||
313 | mLoadingFullImage = TRUE; | ||
314 | getWindow()->incBusyCount(); | ||
315 | mImage->setLoadedCallback( LLPreviewTexture::onFileLoadedForSave, | ||
316 | 0, TRUE, FALSE, new LLUUID( mItemUUID ) ); | ||
316 | } | 317 | } |
317 | 318 | ||
318 | 319 | ||