mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-11 13:14:17 +00:00
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:
parent
4e1cebf966
commit
19d2713d8f
@ -15,6 +15,7 @@
|
|||||||
#include "app/cmd/clear_mask.h"
|
#include "app/cmd/clear_mask.h"
|
||||||
#include "app/cmd/deselect_mask.h"
|
#include "app/cmd/deselect_mask.h"
|
||||||
#include "app/cmd/set_mask.h"
|
#include "app/cmd/set_mask.h"
|
||||||
|
#include "app/console.h"
|
||||||
#include "app/document.h"
|
#include "app/document.h"
|
||||||
#include "app/document_api.h"
|
#include "app/document_api.h"
|
||||||
#include "app/modules/gui.h"
|
#include "app/modules/gui.h"
|
||||||
@ -648,11 +649,16 @@ void PixelsMovement::drawParallelogram(doc::Image* dst, doc::Image* src,
|
|||||||
|
|
||||||
void PixelsMovement::onSetRotationAlgorithm(RotationAlgorithm algorithm)
|
void PixelsMovement::onSetRotationAlgorithm(RotationAlgorithm algorithm)
|
||||||
{
|
{
|
||||||
redrawExtraImage();
|
try {
|
||||||
redrawCurrentMask();
|
redrawExtraImage();
|
||||||
updateDocumentMask();
|
redrawCurrentMask();
|
||||||
|
updateDocumentMask();
|
||||||
|
|
||||||
update_screen_for_document(m_document);
|
update_screen_for_document(m_document);
|
||||||
|
}
|
||||||
|
catch (const std::exception& ex) {
|
||||||
|
Console::showException(ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PixelsMovement::updateDocumentMask()
|
void PixelsMovement::updateDocumentMask()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user