Fix cancelling "Save" while "Keep open after save" is unchecked.

This causes a failure to save local file, or when clicking
Cancel in the file chooser, to keep the image and keep the
snapshot floater open so a retry to save the image can be
attempted.
This commit is contained in:
Aleric Inglewood
2012-11-26 20:41:10 +01:00
parent 7faa19b297
commit d7069a2a66
3 changed files with 85 additions and 7 deletions

View File

@@ -3990,6 +3990,7 @@ void LLViewerWindow::saveImageNumbered(LLPointer<LLImageFormatted> image)
{
if (!image)
{
LLFloaterSnapshot::saveLocalDone(false);
return;
}
@@ -4038,6 +4039,10 @@ void LLViewerWindow::saveImageNumbered_continued1(LLPointer<LLImageFormatted> im
saveImageNumbered_continued2(image, extension);
}
else
{
LLFloaterSnapshot::saveLocalDone(false);
}
}
void LLViewerWindow::saveImageNumbered_continued2(LLPointer<LLImageFormatted> image, std::string const& extension)
@@ -4064,6 +4069,11 @@ void LLViewerWindow::saveImageNumbered_continued2(LLPointer<LLImageFormatted> im
if (image->save(filepath))
{
playSnapshotAnimAndSound();
LLFloaterSnapshot::saveLocalDone(true);
}
else
{
LLFloaterSnapshot::saveLocalDone(false);
}
}