should now be able to save textures properly

This commit is contained in:
Hazim Gazov
2010-05-10 13:46:55 -03:00
parent ee424163c2
commit 1ae8c0e5f6
2 changed files with 23 additions and 2 deletions

View File

@@ -335,7 +335,10 @@ void LLPreviewTexture::draw()
// virtual // virtual
BOOL LLPreviewTexture::canSaveAs() const BOOL LLPreviewTexture::canSaveAs() const
{ {
return mIsCopyable && !mLoadingFullImage && mImage.notNull() && !mImage->isMissingAsset(); // <edit>
//return mIsCopyable && !mLoadingFullImage && mImage.notNull() && !mImage->isMissingAsset();
return !mLoadingFullImage && mImage.notNull() && !mImage->isMissingAsset();
// </edit>
} }
@@ -361,7 +364,10 @@ void LLPreviewTexture::saveAs()
} }
mLoadingFullImage = TRUE; mLoadingFullImage = TRUE;
getWindow()->incBusyCount(); getWindow()->incBusyCount();
mImage->setLoadedCallback( LLPreviewTexture::onFileLoadedForSave, // <edit>
//mImage->setLoadedCallback( LLPreviewTexture::onFileLoadedForSave,
mImage->setLoadedCallbackNoAux( LLPreviewTexture::onFileLoadedForSave,
// </edit>
0, TRUE, FALSE, new LLUUID( mItemUUID ) ); 0, TRUE, FALSE, new LLUUID( mItemUUID ) );
} }
@@ -424,6 +430,18 @@ void LLPreviewTexture::onFileLoadedForSave(BOOL success,
} }
} }
// <edit>
// virtual
LLUUID LLPreviewTexture::getItemID()
{
const LLViewerInventoryItem* item = getItem();
if(item)
{
return item->getUUID();
}
return LLUUID::null;
}
// </edit>
// It takes a while until we get height and width information. // It takes a while until we get height and width information.
// When we receive it, reshape the window accordingly. // When we receive it, reshape the window accordingly.

View File

@@ -63,6 +63,9 @@ public:
virtual BOOL canSaveAs() const; virtual BOOL canSaveAs() const;
virtual void saveAs(); virtual void saveAs();
// <edit>
virtual LLUUID getItemID();
// </edit>
virtual void loadAsset(); virtual void loadAsset();
virtual EAssetStatus getAssetStatus(); virtual EAssetStatus getAssetStatus();