From 1ae8c0e5f684b7ac26b1983803f6dfbd65a6e038 Mon Sep 17 00:00:00 2001 From: Hazim Gazov Date: Mon, 10 May 2010 13:46:55 -0300 Subject: [PATCH] should now be able to save textures properly --- indra/newview/llpreviewtexture.cpp | 22 ++++++++++++++++++++-- indra/newview/llpreviewtexture.h | 3 +++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index 6654d4f9f..fd3aaee5e 100644 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -335,7 +335,10 @@ void LLPreviewTexture::draw() // virtual BOOL LLPreviewTexture::canSaveAs() const { - return mIsCopyable && !mLoadingFullImage && mImage.notNull() && !mImage->isMissingAsset(); + // + //return mIsCopyable && !mLoadingFullImage && mImage.notNull() && !mImage->isMissingAsset(); + return !mLoadingFullImage && mImage.notNull() && !mImage->isMissingAsset(); + // } @@ -361,7 +364,10 @@ void LLPreviewTexture::saveAs() } mLoadingFullImage = TRUE; getWindow()->incBusyCount(); - mImage->setLoadedCallback( LLPreviewTexture::onFileLoadedForSave, + // + //mImage->setLoadedCallback( LLPreviewTexture::onFileLoadedForSave, + mImage->setLoadedCallbackNoAux( LLPreviewTexture::onFileLoadedForSave, + // 0, TRUE, FALSE, new LLUUID( mItemUUID ) ); } @@ -424,6 +430,18 @@ void LLPreviewTexture::onFileLoadedForSave(BOOL success, } } +// +// virtual +LLUUID LLPreviewTexture::getItemID() +{ + const LLViewerInventoryItem* item = getItem(); + if(item) + { + return item->getUUID(); + } + return LLUUID::null; +} +// // It takes a while until we get height and width information. // When we receive it, reshape the window accordingly. diff --git a/indra/newview/llpreviewtexture.h b/indra/newview/llpreviewtexture.h index 3a2357387..a627c2e21 100644 --- a/indra/newview/llpreviewtexture.h +++ b/indra/newview/llpreviewtexture.h @@ -63,6 +63,9 @@ public: virtual BOOL canSaveAs() const; virtual void saveAs(); + // + virtual LLUUID getItemID(); + // virtual void loadAsset(); virtual EAssetStatus getAssetStatus();