Avoid crash when we change the rotation algorithm

This can happen when RotSprite needs a lot of memory and we change the
algorithm from Fast to RotSprite.
This commit is contained in:
David Capello 2015-04-15 10:06:38 -03:00
parent 4e1cebf966
commit 19d2713d8f

View File

@ -15,6 +15,7 @@
#include "app/cmd/clear_mask.h"
#include "app/cmd/deselect_mask.h"
#include "app/cmd/set_mask.h"
#include "app/console.h"
#include "app/document.h"
#include "app/document_api.h"
#include "app/modules/gui.h"
@ -648,11 +649,16 @@ void PixelsMovement::drawParallelogram(doc::Image* dst, doc::Image* src,
void PixelsMovement::onSetRotationAlgorithm(RotationAlgorithm algorithm)
{
try {
redrawExtraImage();
redrawCurrentMask();
updateDocumentMask();
update_screen_for_document(m_document);
}
catch (const std::exception& ex) {
Console::showException(ex);
}
}
void PixelsMovement::updateDocumentMask()