summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindra/newview/llinventorybridge.cpp4
-rwxr-xr-xindra/newview/llpreviewtexture.cpp12
2 files changed, 8 insertions, 8 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 1910656066..1dc5558555 100755
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -4462,11 +4462,11 @@ void LLTextureBridge::performAction(LLInventoryModel* model, std::string action)
{
if ("save_as" == action)
{
- LLFloaterReg::showInstance("preview_texture", LLSD(mUUID), TAKE_FOCUS_YES);
- LLPreviewTexture* preview_texture = LLFloaterReg::findTypedInstance<LLPreviewTexture>("preview_texture", mUUID);
+ LLPreviewTexture* preview_texture = LLFloaterReg::getTypedInstance<LLPreviewTexture>("preview_texture", mUUID);
if (preview_texture)
{
preview_texture->openToSave();
+ preview_texture->saveAs();
}
}
else LLItemBridge::performAction(model, action);
diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp
index fed613543f..f91a18d8d3 100755
--- a/indra/newview/llpreviewtexture.cpp
+++ b/indra/newview/llpreviewtexture.cpp
@@ -183,12 +183,6 @@ void LLPreviewTexture::draw()
if ( mImage.notNull() )
{
- // Automatically bring up SaveAs dialog if we opened this to save the texture.
- if (mPreviewToSave)
- {
- mPreviewToSave = FALSE;
- saveAs();
- }
// Draw the texture
gGL.diffuseColor3f( 1.f, 1.f, 1.f );
gl_draw_scaled_image(interior.mLeft,
@@ -287,6 +281,12 @@ void LLPreviewTexture::saveAs()
// User canceled or we failed to acquire save file.
return;
}
+ if(mPreviewToSave)
+ {
+ mPreviewToSave = FALSE;
+ LLFloaterReg::showTypedInstance<LLPreviewTexture>("preview_texture", item->getUUID());
+ }
+
// remember the user-approved/edited file name.
mSaveFileName = file_picker.getFirstFile();
mLoadingFullImage = TRUE;